mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server dashboard autodiscovery websocket URL
parent
83edc43299
commit
125d52e3a5
|
@ -15,7 +15,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
constructor(private infoService: InfoService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.websocket = new WebSocket('wss://' + location.hostname + ':8443/info');
|
||||
|
||||
const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';
|
||||
const port = (location.port) ? (':' + location.port) : '';
|
||||
|
||||
this.websocket = new WebSocket(protocol + location.hostname + port + '/info');
|
||||
|
||||
this.websocket.onopen = (event) => {
|
||||
console.log('Info websocket connected');
|
||||
|
|
Loading…
Reference in New Issue