@twilio/webrtc
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -0,1 +1,10 @@ | ||
4.1.1 (September 17, 2019) | ||
========================== | ||
Bug Fixes | ||
--------- | ||
- Fixed a bug where ChromeRTCPeerConnection and SafariRTCPeerConnection did not properly | ||
update the SSRCs for MediaStreamTrack IDs in the local offer SDP after a rollback. (JSDK-2463) | ||
4.1.0 (July 12, 2019) | ||
@@ -2,0 +11,0 @@ ===================== |
@@ -43,2 +43,6 @@ /* globals RTCDataChannel, RTCPeerConnection, RTCSessionDescription */ | ||
Object.defineProperties(this, { | ||
_appliedTracksToSSRCs: { | ||
value: new Map(), | ||
writable: true | ||
}, | ||
_localStream: { | ||
@@ -68,3 +72,4 @@ value: new MediaStream() | ||
_tracksToSSRCs: { | ||
value: new Map() | ||
value: new Map(), | ||
writable: true | ||
}, | ||
@@ -104,2 +109,5 @@ localDescription: { | ||
peerConnection.addEventListener('signalingstatechange', function onsignalingstatechange() { | ||
if (peerConnection.signalingState === 'stable') { | ||
self._appliedTracksToSSRCs = new Map(self._tracksToSSRCs); | ||
} | ||
if (!self._pendingLocalOffer && !self._pendingRemoteOffer) { | ||
@@ -344,3 +352,2 @@ self.dispatchEvent.apply(self, arguments); | ||
promise = setRemoteAnswer(peerConnection, description); | ||
} else if (description.type === 'offer') { | ||
@@ -379,2 +386,3 @@ if (peerConnection.signalingState !== intermediateState && peerConnection.signalingState !== 'stable') { | ||
clearPendingLocalOffer(); | ||
peerConnection._tracksToSSRCs = new Map(peerConnection._appliedTracksToSSRCs); | ||
promise = Promise.resolve(); | ||
@@ -381,0 +389,0 @@ promise.then(function dispatchSignalingStateChangeEvent() { |
@@ -31,2 +31,6 @@ /* globals RTCPeerConnection, RTCSessionDescription */ | ||
Object.defineProperties(this, { | ||
_appliedTracksToSSRCs: { | ||
value: new Map(), | ||
writable: true | ||
}, | ||
_audioTransceiver: { | ||
@@ -55,3 +59,4 @@ value: null, | ||
_tracksToSSRCs: { | ||
value: new Map() | ||
value: new Map(), | ||
writable: true | ||
}, | ||
@@ -119,2 +124,5 @@ _videoTransceiver: { | ||
} | ||
if (peerConnection.signalingState === 'stable') { | ||
self._appliedTracksToSSRCs = new Map(self._tracksToSSRCs); | ||
} | ||
if (!self._pendingLocalOffer && !self._pendingRemoteOffer) { | ||
@@ -299,2 +307,3 @@ self.dispatchEvent.apply(self, arguments); | ||
clearPendingLocalOffer(); | ||
peerConnection._tracksToSSRCs = new Map(peerConnection._appliedTracksToSSRCs); | ||
return Promise.resolve().then(function dispatchSignalingStateChangeEvent() { | ||
@@ -301,0 +310,0 @@ peerConnection.dispatchEvent(new Event('signalingstatechange')); |
{ | ||
"name": "@twilio/webrtc", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "WebRTC-related APIs and shims used by twilio-video.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
112698
2623
25