look at signalingState when even is fired, not later when it may have changed

This commit is contained in:
Bruno Windels 2023-02-07 20:11:35 +01:00
parent 3ff91639c6
commit 5ad3f0c671

View File

@ -164,8 +164,9 @@ export class PeerCall implements IDisposable {
});
});
listen("negotiationneeded", () => {
const signalingState = this.peerConnection.signalingState;
const promiseCreator = () => {
return logItem.wrap({l: "onNegotiationNeeded", signalingState: this.peerConnection.signalingState}, log => {
return logItem.wrap({l: "onNegotiationNeeded", signalingState}, log => {
return this.handleNegotiation(log);
});
};