diff --git a/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts b/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts index 79816afb..a048ce63 100644 --- a/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts +++ b/openvidu-server/src/angular/frontend/src/app/components/layouts/layout-best-fit/layout-best-fit.component.ts @@ -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);