@reactoo/watchtogether-sdk-js 2.7.77 → 2.7.79
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/example/index.html
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
console.log('creating participant - participantData', isRemote, data);
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
removeParticipant({id: data.id})
|
|
73
73
|
|
|
74
74
|
if(!data.stream) {
|
|
75
75
|
console.log('no stream for participant');
|
|
@@ -435,6 +435,10 @@
|
|
|
435
435
|
console.log('kicked') // you have been kicked out
|
|
436
436
|
});
|
|
437
437
|
|
|
438
|
+
session.$on('data', (data) => {
|
|
439
|
+
console.log(data);
|
|
440
|
+
});
|
|
441
|
+
|
|
438
442
|
//attaching player
|
|
439
443
|
session.attachPlayer('hlsnative-vod',{videoElement:window.thevideo});
|
|
440
444
|
|
|
@@ -518,6 +522,11 @@
|
|
|
518
522
|
sess.connect().then(() => sess.publishLocal(null, 'camera0'))
|
|
519
523
|
}
|
|
520
524
|
|
|
525
|
+
window.sendCustomData = function () {
|
|
526
|
+
let sess = Instance.room.getSessionByConstructId(constructId);
|
|
527
|
+
sess.sendSystemMessage('data', {some: 'data'})
|
|
528
|
+
}
|
|
529
|
+
|
|
521
530
|
</script>
|
|
522
531
|
|
|
523
532
|
</body>
|
package/package.json
CHANGED
package/src/modules/wt-iot2.js
CHANGED
|
@@ -174,7 +174,6 @@ class Iot {
|
|
|
174
174
|
|
|
175
175
|
this.off('worker:subscribe_result', handleSubscribeResult);
|
|
176
176
|
if (event.success) {
|
|
177
|
-
|
|
178
177
|
resolve();
|
|
179
178
|
} else {
|
|
180
179
|
reject(new Error(event.error));
|
|
@@ -318,7 +317,8 @@ class Iot {
|
|
|
318
317
|
event === 'handLowered' ||
|
|
319
318
|
event === 'handsCleared' ||
|
|
320
319
|
event === 'volume_set' ||
|
|
321
|
-
event === 'asset_created'
|
|
320
|
+
event === 'asset_created' ||
|
|
321
|
+
event === 'attribute_updated'
|
|
322
322
|
) {
|
|
323
323
|
this.emit('message', {event, ...message, roomId})
|
|
324
324
|
}
|