Browse Source

update "is muted" state in presence when adding track

master
isymchych 9 years ago
parent
commit
e997dc72af
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      JitsiConference.js

+ 8
- 0
JitsiConference.js View File

@@ -292,6 +292,14 @@ JitsiConference.prototype.addTrack = function (track) {
292 292
             if (track.startMuted) {
293 293
                 track.mute();
294 294
             }
295
+
296
+            // ensure that we're sharing proper "is muted" state
297
+            if (track.isAudioTrack()) {
298
+                this.room.setAudioMute(track.isMuted());
299
+            } else {
300
+                this.room.setVideoMute(track.isMuted());
301
+            }
302
+
295 303
             track.muteHandler = this._fireMuteChangeEvent.bind(this, track);
296 304
             track.stopHandler = this.removeTrack.bind(this, track);
297 305
             track.audioLevelHandler = this._fireAudioLevelChangeEvent.bind(this);

Loading…
Cancel
Save