@reactoo/watchtogether-sdk-js 2.6.66 → 2.6.68

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.
Files changed (42) hide show
  1. package/dist/watchtogether-sdk.js +3 -3
  2. package/dist/watchtogether-sdk.min.js +2 -2
  3. package/example/bulk_join_room/bulk_join_room.html +30 -30
  4. package/example/bulk_join_room/bulk_join_room_2.css +6 -1
  5. package/example/bulk_join_room/bulk_join_room_2.html +304 -137
  6. package/example/bulk_join_room/sound_empty.mp3 +0 -0
  7. package/example/index.html +3 -3
  8. package/package.json +1 -1
  9. package/src/models/room-session.js +4 -0
  10. package/src/modules/wt-room.js +22 -3
  11. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/1.gif +0 -0
  12. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/10.gif +0 -0
  13. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/11.gif +0 -0
  14. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/12.gif +0 -0
  15. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/13.gif +0 -0
  16. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/14.gif +0 -0
  17. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/15.gif +0 -0
  18. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/16.gif +0 -0
  19. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/17.gif +0 -0
  20. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/18.gif +0 -0
  21. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/19.gif +0 -0
  22. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/2.gif +0 -0
  23. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/20.gif +0 -0
  24. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/21.gif +0 -0
  25. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/22.gif +0 -0
  26. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/23.gif +0 -0
  27. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/24.gif +0 -0
  28. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/25.gif +0 -0
  29. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/26.gif +0 -0
  30. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/27.gif +0 -0
  31. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/28.gif +0 -0
  32. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/29.gif +0 -0
  33. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/3.gif +0 -0
  34. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/30.gif +0 -0
  35. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/31.gif +0 -0
  36. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/32.gif +0 -0
  37. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/4.gif +0 -0
  38. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/5.gif +0 -0
  39. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/6.gif +0 -0
  40. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/7.gif +0 -0
  41. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/8.gif +0 -0
  42. /package/example/bulk_join_room/{persons_gifs → persons_gifs_lq}/9.gif +0 -0
@@ -157,7 +157,7 @@
157
157
  Instance.room.getSessionByConstructId(constructId).setTalkIntercomChannels(groups)
158
158
  }
159
159
 
160
- let Instance = WatchTogetherSDK({debug:true, apiUrl: 'https://api.reactoo.com/stefan/swagger.json'})({instanceType:'reactooDemo'});
160
+ let Instance = WatchTogetherSDK({debug:true})({instanceType:'reactooDemo'});
161
161
 
162
162
  Instance.auth.$on('login', () => {
163
163
  console.log('We are in');
@@ -212,8 +212,8 @@
212
212
  }})) // pin hash is not needed if you're owner of the room
213
213
  .then(session => {
214
214
 
215
- session.setTalkIntercomChannels([]);
216
- session.setListenIntercomChannels([]);
215
+ // session.setTalkIntercomChannels([]);
216
+ // session.setListenIntercomChannels([]);
217
217
 
218
218
  session.$on('connecting', (status) => {
219
219
  console.log('connecting', status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.6.66",
3
+ "version": "2.6.68",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -356,6 +356,10 @@ let roomSession = function ({roomId, pinHash, role}, room, wt) {
356
356
  return room._listenIntercomChannels;
357
357
  },
358
358
 
359
+ requestKeyFrame: (handleId, mid) => {
360
+ return room.requestKeyFrame(handleId, mid);
361
+ },
362
+
359
363
  selectSubStream: (handleId, substream) => {
360
364
  return room.selectSubStream(handleId, substream);
361
365
  },
@@ -95,6 +95,7 @@ class RoomSession {
95
95
  "watchparty": ['participant', 'talkback'],
96
96
  "studio": ['participant', 'talkback', 'host', 'observer'],
97
97
  "commentary": ['participant', 'talkback', 'host'],
98
+ "intercom": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
98
99
  "videowall": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
99
100
  "videowall-queue": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3'],
100
101
  "videowall-queue-video": ['host', 'talkback', 'observer', 'observerSolo1', 'observerSolo2', 'observerSolo3']
@@ -103,6 +104,7 @@ class RoomSession {
103
104
  "watchparty": ['participant', 'host'],
104
105
  "studio": ['participant', 'host', 'observer'],
105
106
  "commentary": ['participant', 'host'],
107
+ "intercom": ['host', 'participant'],
106
108
  "videowall": ['host', 'participant'],
107
109
  "videowall-queue": ['host', 'participant'],
108
110
  "videowall-queue-video": ['host', 'participant'],
@@ -111,6 +113,7 @@ class RoomSession {
111
113
  "watchparty": ['participant', 'host', 'talkback'],
112
114
  "studio": ['participant', 'host', 'observer', 'talkback'],
113
115
  "commentary": ['host', 'participant', 'talkback'],
116
+ "intercom": ['host', 'participant', 'talkback'],
114
117
  "videowall": ['host', 'participant', 'talkback'],
115
118
  "videowall-queue": ['host', 'participant', 'talkback'],
116
119
  "videowall-queue-video": ['host', 'participant', 'talkback'],
@@ -119,6 +122,7 @@ class RoomSession {
119
122
  "watchparty": ['participant'],
120
123
  "studio": ['participant'],
121
124
  "commentary": ['participant'],
125
+ "intercom": ['participant'],
122
126
  "videowall": ['participant'],
123
127
  "videowall-queue": ['participant'],
124
128
  "videowall-queue-video": ['participant'],
@@ -127,6 +131,7 @@ class RoomSession {
127
131
  "watchparty": ['participant'],
128
132
  "studio": ['participant'],
129
133
  "commentary": ['participant'],
134
+ "intercom": ['participant'],
130
135
  "videowall": ['participant'],
131
136
  "videowall-queue": ['participant'],
132
137
  "videowall-queue-video": ['participant'],
@@ -135,6 +140,7 @@ class RoomSession {
135
140
  "watchparty": ['participant'],
136
141
  "studio": ['participant'],
137
142
  "commentary": ['participant'],
143
+ "intercom": ['participant'],
138
144
  "videowall": ['participant'],
139
145
  "videowall-queue": ['participant'],
140
146
  "videowall-queue-video": ['participant'],
@@ -143,6 +149,7 @@ class RoomSession {
143
149
  "watchparty": ['participant'],
144
150
  "studio": ['participant'],
145
151
  "commentary": ['participant'],
152
+ "intercom": ['participant'],
146
153
  "videowall": ['participant'],
147
154
  "videowall-queue": ['participant'],
148
155
  "videowall-queue-video": ['participant'],
@@ -151,6 +158,7 @@ class RoomSession {
151
158
  "watchparty": [],
152
159
  "studio": [],
153
160
  "commentary": [],
161
+ "intercom": [],
154
162
  "videowall": [],
155
163
  "videowall-queue": [],
156
164
  "videowall-queue-video": [],
@@ -1609,6 +1617,9 @@ class RoomSession {
1609
1617
  this._updateRemoteParticipantStreamMap(handle.handleId);
1610
1618
  let mid = event.transceiver ? event.transceiver.mid : event.track.id;
1611
1619
  let source = Object.keys(config.streamMap).find(key => config.streamMap[key].includes(event.track.id));
1620
+ if(event.track.kind === 'video') {
1621
+ this.requestKeyFrame(handle.handleId, mid);
1622
+ }
1612
1623
  this.emit(this._getAddParticipantEventName(handle.handleId), {
1613
1624
  tid: generateUUID(),
1614
1625
  mid,
@@ -1815,7 +1826,7 @@ class RoomSession {
1815
1826
  return null;
1816
1827
  }
1817
1828
  return this.sendMessage(handleId, {
1818
- body: {"request": "configure", "audio": hasAudio, "video": hasVideo, "data": true, ...(this.recordingFilename ? {filename: this.recordingFilename} : {})},
1829
+ body: {"request": "configure", "keyframe": true, "audio": hasAudio, "video": hasVideo, "data": true, ...(this.recordingFilename ? {filename: this.recordingFilename} : {})},
1819
1830
  jsep
1820
1831
  }, false, false, 5);
1821
1832
  })
@@ -2552,8 +2563,17 @@ class RoomSession {
2552
2563
  }
2553
2564
  }
2554
2565
 
2566
+ requestKeyFrame(handleId, mid) {
2567
+ this.sendMessage(handleId, {
2568
+ "body": {
2569
+ "request": "configure",
2570
+ "keyframe": true,
2571
+ ...(mid ? {streams: [{mid,keyframe:true}]} : {})
2572
+ }
2573
+ }).catch(() => null)
2574
+ }
2555
2575
  selectSubStream(handleId, substream = 2) {
2556
- this.sendMessage(this.handleId, {
2576
+ this.sendMessage(handleId, {
2557
2577
  "body": {
2558
2578
  "request": "configure",
2559
2579
  "substream": substream
@@ -2561,7 +2581,6 @@ class RoomSession {
2561
2581
  }).catch(() => null)
2562
2582
  }
2563
2583
 
2564
-
2565
2584
  setTalkIntercomChannels(groups = ['participants']) {
2566
2585
 
2567
2586
  if(typeof groups !== 'object' || !("length" in groups)) {