mirror of https://github.com/OpenVidu/openvidu.git
Recording layout: better way of getting WS protocol
parent
ca1dd07f08
commit
c924cb9ab5
|
@ -106,7 +106,8 @@ export class LayoutBaseComponent implements OnInit, OnDestroy {
|
||||||
});
|
});
|
||||||
|
|
||||||
const p = !!this.port ? (':' + this.port) : (!!location.port ? (':' + location.port) : '');
|
const p = !!this.port ? (':' + this.port) : (!!location.port ? (':' + location.port) : '');
|
||||||
const token = (location.protocol === 'http' ? 'ws' : 'wss') + '://' + location.hostname + p + '?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';
|
const protocol = location.protocol.includes('https') ? 'wss://' : 'ws://';
|
||||||
|
const token = protocol + location.hostname + p + '?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';
|
||||||
this.session.connect(token)
|
this.session.connect(token)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
Loading…
Reference in New Issue