Skip to content

Commit

Permalink
chore: changed connection state attribute to iceConnectionState (Eyev…
Browse files Browse the repository at this point in the history
  • Loading branch information
oshinongit authored Feb 7, 2023
1 parent aad0f9a commit b5271c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/sdk/spec/WHIPClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@ describe('WHIP Client', () => {
})

it('Calling getConnectedState on whipClient returns connectionState attribute once', async () => {
when(rtcPeerConnection.connectionState)
when(rtcPeerConnection.iceConnectionState)
.thenReturn('connected');

whipClient.getConnectionState();
whipClientNoTrickleICE.getConnectionState();
whipClient.getICEConnectionState();
whipClientNoTrickleICE.getICEConnectionState();

verify(rtcPeerConnection.connectionState).once();
verify(rtcPeerConnectionNoTrickleICE.connectionState).once();
verify(rtcPeerConnection.iceConnectionState).once();
verify(rtcPeerConnectionNoTrickleICE.iceConnectionState).once();
});

})
4 changes: 2 additions & 2 deletions packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export class WHIPClient extends EventEmitter {
this.onDoneWaitingForCandidates();
}

getConnectionState() {
return this.peer.connectionState;
getICEConnectionState() {
return this.peer.iceConnectionState;
}

private async startSdpExchange(): Promise<void> {
Expand Down

0 comments on commit b5271c5

Please sign in to comment.