Skip to content

Commit

Permalink
fix: change handleNewPeerConnection args
Browse files Browse the repository at this point in the history
  • Loading branch information
panov-va committed Nov 27, 2024
1 parent de8ddff commit 8f79102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/WebRTCIssueDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class WebRTCIssueDetector {
this.statsReporter.stopReporting();
}

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

const OriginalRTCPeerConnection = window.RTCPeerConnection;
const onConnectionCreated = (pc: RTCPeerConnection) => this.handleNewPeerConnection({ pc });
const onConnectionCreated = (pc: RTCPeerConnection) => this.handleNewPeerConnection(pc);

function WIDRTCPeerConnection(rtcConfig?: RTCConfiguration) {
const connection = new OriginalRTCPeerConnection(rtcConfig);
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WebRTCIssueEmitter } from './WebRTCIssueEmitter';

export interface WIDWindow {
wid: {
handleNewPeerConnection(params: { pc: RTCPeerConnection, id?: string }): void;
handleNewPeerConnection(pc: RTCPeerConnection, id?: string): void;
},
}

Expand Down

0 comments on commit 8f79102

Please sign in to comment.