File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ import { RootController } from "./root.controller";
1414
1515export class StreamController extends Controller {
1616
17+ private readonly janusEndpoint = `https://${ window . location . hostname } :8089/janus` ;
18+
1719 private readonly janusService : JanusService ;
1820
1921
2022 constructor ( rootController : RootController , context : ApplicationContext ) {
2123 super ( rootController , context ) ;
2224
23- this . janusService = new JanusService ( `https:// ${ window . location . hostname } :8089/janus` , this . context . eventEmitter ) ;
25+ this . janusService = new JanusService ( this . janusEndpoint , this . context . eventEmitter ) ;
2426 this . janusService . addEventListener ( "lp-stream-connection-state" , this . onStreamConnectionState . bind ( this ) ) ;
2527
2628 this . eventEmitter . addEventListener ( "lp-stream-capture-stats" , this . onCaptureStats . bind ( this ) ) ;
@@ -60,7 +62,7 @@ export class StreamController extends Controller {
6062
6163 testConnection ( ) {
6264 return new HttpRequest ( { timeout : 0 } )
63- . post < void , { } > ( `https:// ${ window . location . hostname } /janus` , { "janus" : "keepalive" } ) ;
65+ . post < void , { } > ( this . janusEndpoint , { "janus" : "keepalive" } ) ;
6466 }
6567
6668 onPeerConnected ( peerId : bigint , displayName : string ) {
You can’t perform that action at this time.
0 commit comments