Skip to content

Commit 8f79102

Browse files
committed
fix: change handleNewPeerConnection args
1 parent de8ddff commit 8f79102

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/WebRTCIssueDetector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class WebRTCIssueDetector {
140140
this.statsReporter.stopReporting();
141141
}
142142

143-
public handleNewPeerConnection({ pc, id }: { pc: RTCPeerConnection, id?: string }): void {
143+
public handleNewPeerConnection(pc: RTCPeerConnection, id?: string): void {
144144
if (!this.#running && this.autoAddPeerConnections) {
145145
this.logger.debug('Skip handling new peer connection. Detector is not running', pc);
146146
return;
@@ -180,7 +180,7 @@ class WebRTCIssueDetector {
180180
}
181181

182182
const OriginalRTCPeerConnection = window.RTCPeerConnection;
183-
const onConnectionCreated = (pc: RTCPeerConnection) => this.handleNewPeerConnection({ pc });
183+
const onConnectionCreated = (pc: RTCPeerConnection) => this.handleNewPeerConnection(pc);
184184

185185
function WIDRTCPeerConnection(rtcConfig?: RTCConfiguration) {
186186
const connection = new OriginalRTCPeerConnection(rtcConfig);

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { WebRTCIssueEmitter } from './WebRTCIssueEmitter';
44

55
export interface WIDWindow {
66
wid: {
7-
handleNewPeerConnection(params: { pc: RTCPeerConnection, id?: string }): void;
7+
handleNewPeerConnection(pc: RTCPeerConnection, id?: string): void;
88
},
99
}
1010

0 commit comments

Comments
 (0)