diff --git a/index.html b/index.html index 2585c1018..61e80eabd 100644 --- a/index.html +++ b/index.html @@ -31,9 +31,9 @@ - + - + diff --git a/libs/modules/RTC.bundle.js b/libs/modules/RTC.bundle.js index 2887a107d..e33b3a027 100644 --- a/libs/modules/RTC.bundle.js +++ b/libs/modules/RTC.bundle.js @@ -500,9 +500,8 @@ var RTC = { if(!stream) return false; - var isMuted = (value === "true"); - if (isMuted != stream.muted) { - stream.setMute(isMuted); + if (value != stream.muted) { + stream.setMute(value); return true; } return false; diff --git a/libs/modules/UI.bundle.js b/libs/modules/UI.bundle.js index 004a75b2b..c9524654a 100644 --- a/libs/modules/UI.bundle.js +++ b/libs/modules/UI.bundle.js @@ -5814,7 +5814,8 @@ var VideoLayout = (function (my) { /** * On video muted event. */ - $(document).bind('videomuted.muc', function (event, jid, isMuted) { + $(document).bind('videomuted.muc', function (event, jid, value) { + var isMuted = (value === "true"); if(!RTC.muteRemoteVideoStream(jid, isMuted)) return; @@ -5828,7 +5829,7 @@ var VideoLayout = (function (my) { } if (videoSpanId) - VideoLayout.showVideoIndicator(videoSpanId, isMuted); + VideoLayout.showVideoIndicator(videoSpanId, value); }); /** diff --git a/modules/RTC/RTC.js b/modules/RTC/RTC.js index 8553f851c..02d3f55ef 100644 --- a/modules/RTC/RTC.js +++ b/modules/RTC/RTC.js @@ -114,9 +114,8 @@ var RTC = { if(!stream) return false; - var isMuted = (value === "true"); - if (isMuted != stream.muted) { - stream.setMute(isMuted); + if (value != stream.muted) { + stream.setMute(value); return true; } return false; diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 0a5984046..fbeecb933 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -1637,7 +1637,8 @@ var VideoLayout = (function (my) { /** * On video muted event. */ - $(document).bind('videomuted.muc', function (event, jid, isMuted) { + $(document).bind('videomuted.muc', function (event, jid, value) { + var isMuted = (value === "true"); if(!RTC.muteRemoteVideoStream(jid, isMuted)) return; @@ -1651,7 +1652,7 @@ var VideoLayout = (function (my) { } if (videoSpanId) - VideoLayout.showVideoIndicator(videoSpanId, isMuted); + VideoLayout.showVideoIndicator(videoSpanId, value); }); /**