From fa75e9d8c51340d8398412cd5f6dcc356a70062a Mon Sep 17 00:00:00 2001 From: David MacPherson <86945951+david-macpherson@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:23:01 +1000 Subject: [PATCH] Implemented a bug fix to remove the setupWebRTCtcpDetectEvent from the event emitter (#490) --- Frontend/library/src/PixelStreaming/PixelStreaming.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Frontend/library/src/PixelStreaming/PixelStreaming.ts b/Frontend/library/src/PixelStreaming/PixelStreaming.ts index 1b18e7c7..96d2cde4 100644 --- a/Frontend/library/src/PixelStreaming/PixelStreaming.ts +++ b/Frontend/library/src/PixelStreaming/PixelStreaming.ts @@ -119,11 +119,13 @@ export class PixelStreaming { this._webXrController = new WebXRController(this._webRtcController); + this._setupWebRtcTCPRelayDetection = this._setupWebRtcTCPRelayDetection.bind(this) + // Add event listener for the webRtcConnected event this._eventEmitter.addEventListener("webRtcConnected", (webRtcConnectedEvent: WebRtcConnectedEvent) => { // Bind to the stats received event - this._eventEmitter.addEventListener("statsReceived", this._setupWebRtcTCPRelayDetection.bind(this)); + this._eventEmitter.addEventListener("statsReceived", this._setupWebRtcTCPRelayDetection); }); }