@reactoo/watchtogether-sdk-js 2.7.79 → 2.7.80
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
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
console.log('kicked') // you have been kicked out
|
|
436
436
|
});
|
|
437
437
|
|
|
438
|
-
session.$on('
|
|
438
|
+
session.$on('customData', (data) => {
|
|
439
439
|
console.log(data);
|
|
440
440
|
});
|
|
441
441
|
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
|
|
525
525
|
window.sendCustomData = function () {
|
|
526
526
|
let sess = Instance.room.getSessionByConstructId(constructId);
|
|
527
|
-
sess.sendSystemMessage('
|
|
527
|
+
sess.sendSystemMessage('customData', {some: 'data'})
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
</script>
|
package/package.json
CHANGED
|
@@ -205,8 +205,8 @@ let roomSession = function ({roomId, pinHash, role, options = {}}, room, wt) {
|
|
|
205
205
|
if (fromUserId !== ownUserId) {
|
|
206
206
|
this.__sendMuteStatus();
|
|
207
207
|
}
|
|
208
|
-
} else if(msg.user_action === '
|
|
209
|
-
emitter.emit('
|
|
208
|
+
} else if(msg.user_action === 'customData') {
|
|
209
|
+
emitter.emit('customData', msg);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
},
|