openvidu-testapp: use plain openvidu-server HTTP

pull/672/merge
pabloFuente 2022-07-27 15:58:57 +02:00
parent ee2c3d009b
commit 80ed795c65
4 changed files with 8 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import { OpenviduParamsService } from './services/openvidu-params.service';
}) })
export class AppComponent { export class AppComponent {
openviduURL = 'https://' + window.location.hostname + ':4443/'; openviduURL = window.location.protocol + '//' + window.location.hostname + ':4443/';
openviduSecret = 'MY_SECRET'; openviduSecret = 'MY_SECRET';
constructor(private router: Router, private openviduParamsService: OpenviduParamsService) { } constructor(private router: Router, private openviduParamsService: OpenviduParamsService) { }

View File

@ -230,7 +230,11 @@ export class VideoComponent implements OnInit, OnDestroy {
pubUnpubVideo() { pubUnpubVideo() {
const publisher: Publisher = <Publisher>this.streamManager; const publisher: Publisher = <Publisher>this.streamManager;
this.videoMuted = !this.videoMuted; this.videoMuted = !this.videoMuted;
publisher.publishVideo(!this.videoMuted); if (this.videoMuted === true) {
publisher.publishVideo(false, true);
} else {
publisher.publishVideo(true);
}
this.pubSubVideoIcon = this.videoMuted ? 'videocam_off' : 'videocam'; this.pubSubVideoIcon = this.videoMuted ? 'videocam_off' : 'videocam';
} }

View File

@ -11,7 +11,7 @@ export class OpenviduParamsService {
params: OpenviduParams = params: OpenviduParams =
{ {
openviduUrl: 'https://' + window.location.hostname + ':4443/', openviduUrl: window.location.protocol + '//' + window.location.hostname + ':4443/',
openviduSecret: 'MY_SECRET' openviduSecret: 'MY_SECRET'
}; };

View File

@ -5,6 +5,6 @@
export const environment = { export const environment = {
production: false, production: false,
OPENVIDU_URL: 'https://localhost:4443', OPENVIDU_URL: 'http://localhost:4443',
OPENVIDU_SECRET: 'MY_SECRET' OPENVIDU_SECRET: 'MY_SECRET'
}; };