Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Shows dominant speaker icon for the local user, when he is the dominant speaker.
damenchoe81d3c02adb7
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.jsindex 553bd6e0b2..99abdaaa11 100644--- a/modules/UI/videolayout/RemoteVideo.js+++ b/modules/UI/videolayout/RemoteVideo.js@@ -342,41 +342,6 @@ RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted) {}};-/**- * Updates the Indicator for dominant speaker.- *- * @param isSpeaker indicates the current indicator state- */-RemoteVideo.prototype.updateDominantSpeakerIndicator = function (isSpeaker) {-- if (!this.container) {- console.warn( "Unable to set dominant speaker indicator - "- + this.videoSpanId + " does not exist");- return;- }-- var indicatorSpan- = $('#' + this.videoSpanId + '>span.dominantspeakerindicator');-- // If we do not have an indicator for this video.- if (indicatorSpan.length <= 0) {- indicatorSpan = document.createElement('span');-- indicatorSpan.innerHTML- = "<i id='speakerindicatoricon' class='fa fa-bullhorn'></i>";- indicatorSpan.className = 'dominantspeakerindicator';-- $('#' + this.videoSpanId)[0].appendChild(indicatorSpan);-- // adds a tooltip- UIUtils.setTooltip(indicatorSpan, "speaker", "left");- APP.translation.translateElement($(indicatorSpan));- }-- $(indicatorSpan).css("visibility", isSpeaker ? "visible" : "hidden");-};--/*** Sets the display name for the given video span id.*/diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.jsindex b187cdd393..83cb40ec1d 100644--- a/modules/UI/videolayout/SmallVideo.js+++ b/modules/UI/videolayout/SmallVideo.js@@ -382,4 +382,38 @@ SmallVideo.prototype.avatarChanged = function (avatarUrl) {}};+/**+ * Updates the Indicator for dominant speaker.+ *+ * @param isSpeaker indicates the current indicator state+ */+SmallVideo.prototype.updateDominantSpeakerIndicator = function (isSpeaker) {++ if (!this.container) {+ console.warn( "Unable to set dominant speaker indicator - "+ + this.videoSpanId + " does not exist");+ return;+ }++ var indicatorSpan+ = $('#' + this.videoSpanId + '>span.dominantspeakerindicator');++ // If we do not have an indicator for this video.+ if (indicatorSpan.length <= 0) {+ indicatorSpan = document.createElement('span');++ indicatorSpan.innerHTML+ = "<i id='speakerindicatoricon' class='fa fa-bullhorn'></i>";+ indicatorSpan.className = 'dominantspeakerindicator';++ $('#' + this.videoSpanId)[0].appendChild(indicatorSpan);++ // adds a tooltip+ UIUtil.setTooltip(indicatorSpan, "speaker", "left");+ APP.translation.translateElement($(indicatorSpan));+ }++ $(indicatorSpan).css("visibility", isSpeaker ? "visible" : "hidden");+};+export default SmallVideo;diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.jsindex 59d010696f..aab117ac2c 100644--- a/modules/UI/videolayout/VideoLayout.js+++ b/modules/UI/videolayout/VideoLayout.js@@ -538,6 +538,7 @@ var VideoLayout = {if(oldSpeakerRemoteVideo){oldSpeakerRemoteVideo.updateDominantSpeakerIndicator(false);+ localVideoThumbnail.updateDominantSpeakerIndicator(true);currentDominantSpeaker = null;}return;@@ -550,6 +551,7 @@ var VideoLayout = {// Update the current dominant speaker.remoteVideo.updateDominantSpeakerIndicator(true);+ localVideoThumbnail.updateDominantSpeakerIndicator(false);// let's remove the indications from the remote video if anyif (oldSpeakerRemoteVideo) {