fix the hardcoded port

This commit is contained in:
Stavros Zavrakas 2018-06-15 10:36:34 +01:00
parent 263db59bdd
commit 02e3d471d9

View File

@ -90,7 +90,8 @@ export class LayoutBestFitComponent implements OnInit, OnDestroy {
this.updateLayout(changeFixedRatio);
});
const token = 'wss://' + location.hostname + ':4443?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';
const port = !!location.port ? (':' + location.port) : '';
const token = 'wss://' + location.hostname + location.port + '?sessionId=' + this.sessionId + '&secret=' + this.secret + '&recorder=true';
this.session.connect(token)
.catch(error => {
console.error(error);