@reactoo/watchtogether-sdk-js 2.8.35 → 2.8.37

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.8.35",
3
+ "version": "2.8.37",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -47,7 +47,7 @@ let system = function () {
47
47
  },
48
48
  requestSupport: (data = {}) => {
49
49
  return this.__privates.auth.__client
50
- .then(client => client.apis.wt.requestSupport({supportType: data.supportType},{requestBody:{...data}}));
50
+ .then(client => client.apis.system.requestSupport({supportType: data.supportType},{requestBody:{...data}}));
51
51
  },
52
52
  analytics: ({action, startKey = null, limit = 20} = {}) => {
53
53
 
@@ -106,6 +106,7 @@ class RoomSession {
106
106
  participant: {
107
107
  "watchparty": ['participant', 'talkback'],
108
108
  "studio": ['participant', 'talkback', 'host', 'observer'],
109
+ "template": ['participant', 'talkback', 'host', 'observer'], // same as studio
109
110
  "commentary": ['participant', 'talkback', 'host'],
110
111
  "intercom": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3', 'observerSolo4', 'observerSolo5'],
111
112
  "videowall": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3', 'observerSolo4', 'observerSolo5'],
@@ -115,6 +116,7 @@ class RoomSession {
115
116
  monitor: {
116
117
  "watchparty": ['participant', 'host'],
117
118
  "studio": ['participant', 'host', 'observer'],
119
+ "template": ['participant', 'host', 'observer'], // same as studio
118
120
  "commentary": ['participant', 'host'],
119
121
  "intercom": ['host', 'participant'],
120
122
  "videowall": ['host', 'participant'],
@@ -124,6 +126,7 @@ class RoomSession {
124
126
  talkback: {
125
127
  "watchparty": ['participant', 'host', 'talkback'],
126
128
  "studio": ['participant', 'host', 'observer', 'talkback'],
129
+ "template": ['participant', 'host', 'observer', 'talkback'], // same as studio
127
130
  "commentary": ['host', 'participant', 'talkback'],
128
131
  "intercom": ['host', 'participant', 'talkback'],
129
132
  "videowall": ['host', 'participant', 'talkback'],
@@ -133,6 +136,7 @@ class RoomSession {
133
136
  observer: {
134
137
  "watchparty": ['participant'],
135
138
  "studio": ['participant'],
139
+ "template": ['participant'], // same as studio
136
140
  "commentary": ['participant'],
137
141
  "intercom": ['participant'],
138
142
  "videowall": ['participant'],
@@ -142,6 +146,7 @@ class RoomSession {
142
146
  observerSolo1: {
143
147
  "watchparty": ['participant'],
144
148
  "studio": ['participant'],
149
+ "template": ['participant'], // same as studio
145
150
  "commentary": ['participant'],
146
151
  "intercom": ['participant'],
147
152
  "videowall": ['participant'],
@@ -151,6 +156,7 @@ class RoomSession {
151
156
  observerSolo2: {
152
157
  "watchparty": ['participant'],
153
158
  "studio": ['participant'],
159
+ "template": ['participant'], // same as studio
154
160
  "commentary": ['participant'],
155
161
  "intercom": ['participant'],
156
162
  "videowall": ['participant'],
@@ -160,6 +166,7 @@ class RoomSession {
160
166
  observerSolo3: {
161
167
  "watchparty": ['participant'],
162
168
  "studio": ['participant'],
169
+ "template": ['participant'], // same as studio
163
170
  "commentary": ['participant'],
164
171
  "intercom": ['participant'],
165
172
  "videowall": ['participant'],
@@ -169,6 +176,7 @@ class RoomSession {
169
176
  observerSolo4: {
170
177
  "watchparty": ['participant'],
171
178
  "studio": ['participant'],
179
+ "template": ['participant'], // same as studio
172
180
  "commentary": ['participant'],
173
181
  "intercom": ['participant'],
174
182
  "videowall": ['participant'],
@@ -178,6 +186,7 @@ class RoomSession {
178
186
  observerSolo5: {
179
187
  "watchparty": ['participant'],
180
188
  "studio": ['participant'],
189
+ "template": ['participant'], // same as studio
181
190
  "commentary": ['participant'],
182
191
  "intercom": ['participant'],
183
192
  "videowall": ['participant'],
@@ -187,6 +196,7 @@ class RoomSession {
187
196
  host: {
188
197
  "watchparty": [],
189
198
  "studio": [],
199
+ "template": [],
190
200
  "commentary": [],
191
201
  "intercom": [],
192
202
  "videowall": [],
@@ -3275,6 +3285,7 @@ class RoomSession {
3275
3285
  const myUserRole = decodeJanusDisplay(this.display)?.role || 'participant';
3276
3286
  const remoteUserRole = parsedDisplay?.role || 'participant';
3277
3287
  const remoteUserId = parsedDisplay?.userId;
3288
+ console.log('pica', myUserRole, this.userRoleSubscriptionRules, this._roomType || 'watchparty');
3278
3289
  const shouldSubscribeToUserRole = this.userRoleSubscriptionRules[myUserRole][(this._roomType || 'watchparty')].indexOf(remoteUserRole) > -1
3279
3290
  const shouldSubscribeToUserId = this._restrictSubscribeToUserIds.length === 0 || this._restrictSubscribeToUserIds.indexOf(remoteUserId) > -1;
3280
3291
  return shouldSubscribeToUserRole && shouldSubscribeToUserId;