From 8fafd2b4eaaaf40f7be6cb38bd9811f4deba49b3 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Mon, 10 Oct 2016 17:03:28 -0500 Subject: [PATCH] feat(SmallVideo.js): New interface.config property for dominant speaker icon disable --- interface_config.js | 1 + modules/UI/videolayout/SmallVideo.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/interface_config.js b/interface_config.js index 41530f6e1..35ddd2abd 100644 --- a/interface_config.js +++ b/interface_config.js @@ -42,6 +42,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars // Enables feedback star animation. ENABLE_FEEDBACK_ANIMATION: false, DISABLE_FOCUS_INDICATOR: false, + DISABLE_DOMINANT_SPEAKER_INDICATOR: false, AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)", AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)" }; diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js index 4f96e5853..90af5c4d7 100644 --- a/modules/UI/videolayout/SmallVideo.js +++ b/modules/UI/videolayout/SmallVideo.js @@ -508,6 +508,11 @@ SmallVideo.prototype.avatarChanged = function (avatarUrl) { * @param show whether to show or hide. */ SmallVideo.prototype.showDominantSpeakerIndicator = function (show) { + // Don't create and show dominant speaker indicator if + // DISABLE_DOMINANT_SPEAKER_INDICATOR is true + if (interfaceConfig.DISABLE_DOMINANT_SPEAKER_INDICATOR) + return; + if (!this.container) { console.warn( "Unable to set dominant speaker indicator - " + this.videoSpanId + " does not exist");