@reactoo/watchtogether-sdk-js 2.6.87 → 2.6.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.6.87",
3
+ "version": "2.6.89",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -787,6 +787,7 @@ class RoomSession {
787
787
  this._log('Substream: ', sender, mid, substream);
788
788
  this._setSelectedSubstream(sender, mid, substream);
789
789
  this._resetStats(sender, mid);
790
+ this.requestKeyFrame(sender, mid)
790
791
  }
791
792
 
792
793
  if(temporal !== undefined && temporal !== null) {
@@ -1582,7 +1583,9 @@ class RoomSession {
1582
1583
  const initialSubstreamBeenSet = !!p.webrtcStuff.initialSimulcastSubstreamBeenSet[mid];
1583
1584
  const manualSelectedSubstream = p.webrtcStuff.simulcastSubstreamManualSelect?.[mid];
1584
1585
  const defaultSelectedSubstream = typeof this.simulcastDefaultManualSubstream === 'object'
1585
- ? (this.simulcastDefaultManualSubstream[source] !== undefined ? this.simulcastDefaultManualSubstream[source] : this.simulcastDefaultManualSubstream['default'])
1586
+ ? (this.simulcastDefaultManualSubstream[source] !== undefined
1587
+ ? this.simulcastDefaultManualSubstream[source]
1588
+ : this.simulcastDefaultManualSubstream['default'])
1586
1589
  : this.simulcastDefaultManualSubstream;
1587
1590
  const simulcastMode = typeof this.simulcastMode === 'object'
1588
1591
  ? (this.simulcastMode[source] !== undefined ? this.simulcastMode[source] : this.simulcastMode['default'])
@@ -2970,6 +2973,9 @@ class RoomSession {
2970
2973
  }
2971
2974
 
2972
2975
  selectSubStream(handleId, substream = 2, source, mid, manual = true) {
2976
+
2977
+ this._log('Select SubStream attempt', handleId, substream, source, mid, 'was this selected by user', manual);
2978
+
2973
2979
  let handle = this._getHandle(handleId);
2974
2980
  if(!handle) {
2975
2981
  return Promise.resolve();
@@ -2994,9 +3000,11 @@ class RoomSession {
2994
3000
  clearTimeout(messageTimeoutId);
2995
3001
  this._abortController.signal.removeEventListener('abort', abortResponse);
2996
3002
  this.ws.removeEventListener('message', parseResponse);
3003
+
2997
3004
  if(manual) {
2998
3005
  config.simulcastSubstreamManualSelect[mid] = substream;
2999
3006
  }
3007
+
3000
3008
  resolve({substream, sender});
3001
3009
  }
3002
3010
  }