From 6235ff163e3e0bb7ea8b17a765af642737ce18a3 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Tue, 30 Jun 2015 14:34:11 +0300 Subject: [PATCH] Fixes audio mute. --- index.html | 2 +- libs/app.bundle.js | 6 ++---- modules/UI/videolayout/SmallVideo.js | 2 +- modules/UI/videolayout/VideoLayout.js | 2 +- modules/xmpp/strophe.emuc.js | 2 -- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 6c992a264e..a0aecb188f 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ - + diff --git a/libs/app.bundle.js b/libs/app.bundle.js index fb76fcf2d9..8a9f18cca0 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -7902,7 +7902,7 @@ SmallVideo.prototype.hideIndicator = function () { SmallVideo.prototype.showAudioIndicator = function(isMuted) { var audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted'); - if (isMuted === 'false') { + if (!isMuted) { if (audioMutedSpan.length > 0) { audioMutedSpan.popover('hide'); audioMutedSpan.remove(); @@ -8456,7 +8456,7 @@ var VideoLayout = (function (my) { * @param {boolean} isMuted */ my.showLocalAudioIndicator = function(isMuted) { - localVideoThumbnail.showAudioIndicator(isMuted.toString()); + localVideoThumbnail.showAudioIndicator(isMuted); }; /** @@ -14988,7 +14988,6 @@ module.exports = function(XMPP, eventEmitter) { if (audioMuted.length) { eventEmitter.emit(XMPPEvents.AUDIO_MUTED, from, (audioMuted.text() === "true")); - $(document).trigger('audiomuted.muc', [from, ]); } // Parse video info tag. @@ -14996,7 +14995,6 @@ module.exports = function(XMPP, eventEmitter) { if (videoMuted.length) { eventEmitter.emit(XMPPEvents.VIDEO_MUTED, from, (videoMuted.text() === "true")); - $(document).trigger('videomuted.muc', [from, ]); } var startMuted = $(pres).find('>startmuted'); diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js index 6fe3cf16f3..cc0e27de29 100644 --- a/modules/UI/videolayout/SmallVideo.js +++ b/modules/UI/videolayout/SmallVideo.js @@ -126,7 +126,7 @@ SmallVideo.prototype.hideIndicator = function () { SmallVideo.prototype.showAudioIndicator = function(isMuted) { var audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted'); - if (isMuted === 'false') { + if (!isMuted) { if (audioMutedSpan.length > 0) { audioMutedSpan.popover('hide'); audioMutedSpan.remove(); diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 067294fd3a..2b9a8cd5df 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -328,7 +328,7 @@ var VideoLayout = (function (my) { * @param {boolean} isMuted */ my.showLocalAudioIndicator = function(isMuted) { - localVideoThumbnail.showAudioIndicator(isMuted.toString()); + localVideoThumbnail.showAudioIndicator(isMuted); }; /** diff --git a/modules/xmpp/strophe.emuc.js b/modules/xmpp/strophe.emuc.js index e71fd58614..5c28d5ef1c 100644 --- a/modules/xmpp/strophe.emuc.js +++ b/modules/xmpp/strophe.emuc.js @@ -145,7 +145,6 @@ module.exports = function(XMPP, eventEmitter) { if (audioMuted.length) { eventEmitter.emit(XMPPEvents.AUDIO_MUTED, from, (audioMuted.text() === "true")); - $(document).trigger('audiomuted.muc', [from, ]); } // Parse video info tag. @@ -153,7 +152,6 @@ module.exports = function(XMPP, eventEmitter) { if (videoMuted.length) { eventEmitter.emit(XMPPEvents.VIDEO_MUTED, from, (videoMuted.text() === "true")); - $(document).trigger('videomuted.muc', [from, ]); } var startMuted = $(pres).find('>startmuted');