Skip to content

Commit

Permalink
Fixed Janus endpoint url in stream.controller
Browse files Browse the repository at this point in the history
  • Loading branch information
devopvoid committed May 25, 2024
1 parent 3ddc196 commit 00ba29b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/component/controller/stream.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ import { RootController } from "./root.controller";

export class StreamController extends Controller {

private readonly janusEndpoint = `https://${window.location.hostname}:8089/janus`;

private readonly janusService: JanusService;


constructor(rootController: RootController, context: ApplicationContext) {
super(rootController, context);

this.janusService = new JanusService(`https://${window.location.hostname}:8089/janus`, this.context.eventEmitter);
this.janusService = new JanusService(this.janusEndpoint, this.context.eventEmitter);
this.janusService.addEventListener("lp-stream-connection-state", this.onStreamConnectionState.bind(this));

this.eventEmitter.addEventListener("lp-stream-capture-stats", this.onCaptureStats.bind(this));
Expand Down Expand Up @@ -60,7 +62,7 @@ export class StreamController extends Controller {

testConnection() {
return new HttpRequest({ timeout: 0 })
.post<void, {}>(`https://${window.location.hostname}/janus`, { "janus": "keepalive" });
.post<void, {}>(this.janusEndpoint, { "janus": "keepalive" });
}

onPeerConnected(peerId: bigint, displayName: string) {
Expand Down

0 comments on commit 00ba29b

Please sign in to comment.