From ba1fdd842e96bfcaac624403351b98bc269ea7b9 Mon Sep 17 00:00:00 2001 From: Haythem Farhat Date: Thu, 14 Nov 2024 11:53:07 +0100 Subject: [PATCH] fix: debug reports are missing key information --- packages/js/src/Modules/Verto/webrtc/Peer.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/js/src/Modules/Verto/webrtc/Peer.ts b/packages/js/src/Modules/Verto/webrtc/Peer.ts index 5b1b5168..1c5cf772 100644 --- a/packages/js/src/Modules/Verto/webrtc/Peer.ts +++ b/packages/js/src/Modules/Verto/webrtc/Peer.ts @@ -91,16 +91,16 @@ export default class Peer { this._webrtcStatsReporter = webRTCStatsReporter(); this._session.execute(this._webrtcStatsReporter.start()); + this._webrtcStatsReporter.debuggerInstance.on( + 'timeline', + this._onDebugReportMessage + ); + this._webrtcStatsReporter.debuggerInstance.addConnection({ pc: this.instance, peerId: this.options.id, connectionId: this.options.telnyxSessionId, }); - - this._webrtcStatsReporter.debuggerInstance.on( - 'timeline', - this._onDebugReportMessage - ); } public stopDebugger() { @@ -108,8 +108,8 @@ export default class Peer { return; } - this._webrtcStatsReporter.debuggerInstance.destroy(); this._session.execute(this._webrtcStatsReporter.stop()); + this._webrtcStatsReporter.debuggerInstance.destroy(); } private _logTransceivers() {