Skip to content

Commit 00ba29b

Browse files
committed
Fixed Janus endpoint url in stream.controller
1 parent 3ddc196 commit 00ba29b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/component/controller/stream.controller.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ import { RootController } from "./root.controller";
1414

1515
export 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) {

0 commit comments

Comments
 (0)