@reactoo/watchtogether-sdk-js 2.8.21 → 2.8.22

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.21",
3
+ "version": "2.8.22",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -444,6 +444,11 @@ let roomSession = function ({roomId, pinHash, role, options = {}}, room, wt) {
444
444
  },
445
445
 
446
446
  __sendMuteStatus: function () {
447
+
448
+ if(room.getMyUserRole() !== 'participant') {
449
+ return;
450
+ }
451
+
447
452
  for(const val of room.isMuted) {
448
453
  this.sendSystemMessage('remote_muted', {...val});
449
454
  }
@@ -3210,6 +3210,10 @@ class RoomSession {
3210
3210
  }
3211
3211
  }
3212
3212
 
3213
+ getMyUserRole() {
3214
+ return decodeJanusDisplay(this.display)?.role || 'participant';
3215
+ }
3216
+
3213
3217
  requestKeyFrame(handleId, mid) {
3214
3218
  this.sendMessage(handleId, {
3215
3219
  "body": {