@reactoo/watchtogether-sdk-js 2.5.70 → 2.5.73

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.5.70",
3
+ "version": "2.5.73",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -33,7 +33,7 @@ const syncModule = function ({room, emitter} = {}) {
33
33
 
34
34
  const startSyncLoop = () => {
35
35
 
36
- if(!isConnected()) {
36
+ if(!isConnected() && _playerInterfaceOptions.type !== 'push') {
37
37
  room._log('--- Sync loop will not start due to user not connected yet ---');
38
38
  return
39
39
  }
@@ -47,7 +47,7 @@ const syncModule = function ({room, emitter} = {}) {
47
47
 
48
48
  stopFlag = false;
49
49
 
50
- if(!_playerInterfaceOptions.type === 'push') {
50
+ if(_playerInterfaceOptions.type !== 'push') {
51
51
  const loop = () => {
52
52
 
53
53
  isSyncing = true;
@@ -85,11 +85,6 @@ const syncModule = function ({room, emitter} = {}) {
85
85
  loop2();
86
86
  }
87
87
 
88
-
89
-
90
- //TODO: push sync
91
-
92
-
93
88
  };
94
89
 
95
90
  const stopSyncLoop = (doNotResetRetryCount) => {
@@ -267,7 +262,7 @@ const syncModule = function ({room, emitter} = {}) {
267
262
  reject('Stalled');
268
263
  };
269
264
 
270
- console.log('Users stream is behind behind live by:',diff);
265
+ console.log('Users stream is behind behind live by:', diff);
271
266
  if(diff_target > 0) {
272
267
  _emitter.once('stalled', __);
273
268
  setExactTimeout(() => {
@@ -276,7 +271,7 @@ const syncModule = function ({room, emitter} = {}) {
276
271
  isSyncing = false;
277
272
  _emitter.off('stalled', __);
278
273
  resolve();
279
- }, (diff_target * 1000) / playbackRate, 20);
274
+ }, (diff_target * 1000) / (playbackRate - 1), 20);
280
275
  isProgrammaticallySeeked = true;
281
276
  isSyncing = true;
282
277
  _playerInterface.setPlaybackRate(playbackRate);
@@ -97,21 +97,21 @@ class RoomSession {
97
97
  static subscriptionRules = {
98
98
  participant: {
99
99
  "watchparty": ['participant', 'talkback'],
100
- "commentary": ['participant', 'talkback'],
100
+ "commentary": ['participant', 'talkback', 'host'],
101
101
  "videowall": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
102
102
  "videowall-queue": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
103
103
  "videowall-queue-video": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3']
104
104
  },
105
105
  monitor: {
106
106
  "watchparty": ['participant'],
107
- "commentary": ['participant'],
107
+ "commentary": ['participant', 'host'],
108
108
  "videowall": ['host', 'participant'],
109
109
  "videowall-queue": ['host', 'participant'],
110
110
  "videowall-queue-video": ['host', 'participant'],
111
111
  },
112
112
  talkback: {
113
113
  "watchparty": ['participant'],
114
- "commentary": ['participant'],
114
+ "commentary": ['host', 'participant'],
115
115
  "videowall": ['host', 'participant'],
116
116
  "videowall-queue": ['host', 'participant'],
117
117
  "videowall-queue-video": ['host', 'participant'],