@reactoo/watchtogether-sdk-js 2.5.71 → 2.5.74

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.
@@ -183,7 +183,7 @@
183
183
  }
184
184
 
185
185
  function joinRoom(participantData) {
186
- return participantData.sdkInstance.auth.deviceLogin(participantData.id)
186
+ return participantData.sdkInstance.auth.deviceLogin(false, participantData.id)
187
187
  .then(() => participantData.sdkInstance.room.createSession({roomId, pinHash}))
188
188
  .then(session => {
189
189
  participantData.session = session;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.5.71",
3
+ "version": "2.5.74",
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) => {
@@ -109,12 +109,12 @@ class Auth {
109
109
  this.emit(this.__isLogged ? 'login' : 'logout', {
110
110
  client,
111
111
  isInitialEvent,
112
+ isReauth,
112
113
  isLoggedInAsDevice: this.isLoggedInAs(this.__parsedJwt, 'device'),
113
114
  isLoggedInAsObserver: this.isLoggedInAs(this.__parsedJwt, 'observer'),
114
115
  isLoggedInAsInstanceAdmin: this.isLoggedInAs(this.__parsedJwt, 'instanceAdmin'),
115
116
  isLoggedInAsAdmin: this.isLoggedInAs(this.__parsedJwt, 'admin'),
116
- domain: this.getDomain(this.__parsedJwt),
117
- isReauth
117
+ domain: this.getDomain(this.__parsedJwt)
118
118
  });
119
119
  return client;
120
120
  })
@@ -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'],
@@ -2027,7 +2027,7 @@ class RoomSession {
2027
2027
  tid: generateUUID(),
2028
2028
  id: handle.handleId,
2029
2029
  userId: decodeJanusDisplay(handle.userId)?.userId,
2030
- role: decodeJanusDisplay(handle.userId)?.role,
2030
+ role: decodeJanusDisplay(this.display)?.role,
2031
2031
  track,
2032
2032
  stream: config.stream,
2033
2033
  adding: true,
@@ -2041,7 +2041,7 @@ class RoomSession {
2041
2041
  tid:generateUUID(),
2042
2042
  id: handle.handleId,
2043
2043
  userId: decodeJanusDisplay(handle.userId)?.userId,
2044
- role: decodeJanusDisplay(handle.userId)?.role,
2044
+ role: decodeJanusDisplay(this.display)?.role,
2045
2045
  track: ev.target,
2046
2046
  stream: config.stream,
2047
2047
  adding: false,
@@ -2059,7 +2059,7 @@ class RoomSession {
2059
2059
  tid: generateUUID(),
2060
2060
  id: handle.handleId,
2061
2061
  userId: decodeJanusDisplay(handle.userId)?.userId,
2062
- role: decodeJanusDisplay(handle.userId)?.role,
2062
+ role: decodeJanusDisplay(this.display)?.role,
2063
2063
  stream: null,
2064
2064
  adding: false,
2065
2065
  constructId: this.constructId,