@reactoo/watchtogether-sdk-js 2.7.96 → 2.7.98
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/.babelrc +2 -1
- package/dist/watchtogether-sdk.js +52 -35
- package/dist/watchtogether-sdk.js.map +1 -1
- package/dist/watchtogether-sdk.min.js +2 -2
- package/example/index.html +67 -34
- package/package.json +2 -1
- package/src/models/asset.js +6 -2
- package/src/models/room-session.js +14 -7
- package/src/modules/wt-iot-worker5.worker.js +75 -56
- package/src/modules/wt-iot2.js +9 -9
- package/src/modules/wt-room-sfu.js +3194 -0
- package/src/modules/wt-room.js +14 -5
package/src/modules/wt-room.js
CHANGED
|
@@ -1241,7 +1241,7 @@ class RoomSession {
|
|
|
1241
1241
|
if (handleId === this.handleId) {
|
|
1242
1242
|
this._isDataChannelOpen = false;
|
|
1243
1243
|
this.isPublished = false;
|
|
1244
|
-
this.emit('published',
|
|
1244
|
+
this.emit('published', false);
|
|
1245
1245
|
this.emit('removeLocalParticipant', {
|
|
1246
1246
|
id: handleId,
|
|
1247
1247
|
userId: decodeJanusDisplay(handle.userId)?.userId,
|
|
@@ -1719,7 +1719,7 @@ class RoomSession {
|
|
|
1719
1719
|
this.isConnected = false;
|
|
1720
1720
|
this.isDisconnecting = false;
|
|
1721
1721
|
this.emit('publishing', false);
|
|
1722
|
-
this.emit('published',
|
|
1722
|
+
this.emit('published', false);
|
|
1723
1723
|
this.emit('joining', false);
|
|
1724
1724
|
this.emit('joined', false);
|
|
1725
1725
|
this.emit('disconnect', isConnected);
|
|
@@ -1873,7 +1873,7 @@ class RoomSession {
|
|
|
1873
1873
|
|
|
1874
1874
|
_disableStatsWatch() {
|
|
1875
1875
|
if (this._statsTimeoutId) {
|
|
1876
|
-
|
|
1876
|
+
clearTimeout(this._statsTimeoutId);
|
|
1877
1877
|
this._statsTimeoutStopped = true;
|
|
1878
1878
|
this._statsTimeoutId = null;
|
|
1879
1879
|
}
|
|
@@ -3182,7 +3182,7 @@ class RoomSession {
|
|
|
3182
3182
|
for(const val of this.isMuted) {
|
|
3183
3183
|
this.emit('localMuted', {...val});
|
|
3184
3184
|
}
|
|
3185
|
-
this.emit('published',
|
|
3185
|
+
this.emit('published', true);
|
|
3186
3186
|
this.emit('publishing', false);
|
|
3187
3187
|
return this;
|
|
3188
3188
|
};
|
|
@@ -3281,7 +3281,7 @@ class RoomSession {
|
|
|
3281
3281
|
? this.sendMessage(this.handleId, {body: {"request": "unpublish"}}, dontWait)
|
|
3282
3282
|
.finally(r => {
|
|
3283
3283
|
this.isPublished = false;
|
|
3284
|
-
this.emit('published',
|
|
3284
|
+
this.emit('published', false);
|
|
3285
3285
|
return r
|
|
3286
3286
|
})
|
|
3287
3287
|
: Promise.resolve()
|
|
@@ -3696,6 +3696,15 @@ class RoomSession {
|
|
|
3696
3696
|
this._removeParticipant(handle.handleId);
|
|
3697
3697
|
}
|
|
3698
3698
|
})
|
|
3699
|
+
|
|
3700
|
+
// hotfix
|
|
3701
|
+
|
|
3702
|
+
setTimeout(() => {
|
|
3703
|
+
if(this.isConnected) {
|
|
3704
|
+
this.emit('requestMuteStatus');
|
|
3705
|
+
}
|
|
3706
|
+
}, 2000)
|
|
3707
|
+
|
|
3699
3708
|
});
|
|
3700
3709
|
|
|
3701
3710
|
|