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
Renames all active speaker references to be called dominant speaker.
damencho3fd68fa0fd2f
diff --git a/conference.js b/conference.jsindex 107d907ffd..83185a45f7 100644--- a/conference.js+++ b/conference.js@@ -361,8 +361,8 @@ export default {room.on(ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids) => {APP.UI.handleLastNEndpoints(ids);});- room.on(ConferenceEvents.ACTIVE_SPEAKER_CHANGED, (id) => {- APP.UI.markDominantSpiker(id);+ room.on(ConferenceEvents.DOMINANT_SPEAKER_CHANGED, (id) => {+ APP.UI.markDominantSpeaker(id);});if (!interfaceConfig.filmStripOnly) {diff --git a/css/videolayout_default.css b/css/videolayout_default.cssindex 2935fcab97..96213fdace 100644--- a/css/videolayout_default.css+++ b/css/videolayout_default.css@@ -407,7 +407,7 @@pointer-events: none;}-#activeSpeaker {+#dominantSpeaker {visibility: hidden;width: 150px;height: 150px;@@ -416,7 +416,7 @@position: relative;}-#activeSpeakerAudioLevel {+#dominantSpeakerAudioLevel {position: absolute;top: 0px;left: 0px;@@ -428,7 +428,7 @@display:none !important;}-#activeSpeakerAvatar {+#dominantSpeakerAvatar {width: 100px;height: 100px;top: 25px;diff --git a/index.html b/index.htmlindex e7c8af05d6..993802d76b 100644--- a/index.html+++ b/index.html@@ -149,9 +149,9 @@<a class="poweredby" href="http://jitsi.org" target="_new"><span data-i18n="poweredby"></span> jitsi.org</a>- <div id="activeSpeaker">- <img id="activeSpeakerAvatar" src=""/>- <canvas id="activeSpeakerAudioLevel"></canvas>+ <div id="dominantSpeaker">+ <img id="domianatSpeakerAvatar" src=""/>+ <canvas id="dominantSpeakerAudioLevel"></canvas></div><div id="largeVideoWrapper"><video id="largeVideo" muted="true" autoplay oncontextmenu="return false;"></video>diff --git a/interface_config.js b/interface_config.jsindex 3078707e0d..cb0e84b486 100644--- a/interface_config.js+++ b/interface_config.js@@ -14,7 +14,7 @@ var interfaceConfig = {GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,APP_NAME: "Jitsi Meet",INVITATION_POWERED_BY: true,- ACTIVE_SPEAKER_AVATAR_SIZE: 100,+ DOMINANT_SPEAKER_AVATAR_SIZE: 100,TOOLBAR_BUTTONS: ['authentication', 'microphone', 'camera', 'desktop','recording', 'security', 'invite', 'chat', 'prezi', 'etherpad','fullscreen', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip',diff --git a/libs/lib-jitsi-meet.js b/libs/lib-jitsi-meet.jsindex be2309da2f..9685739e6a 100644--- a/libs/lib-jitsi-meet.js+++ b/libs/lib-jitsi-meet.js@@ -41,7 +41,7 @@ function JitsiConference(options) {this.statistics = new Statistics();setupListeners(this);this.participants = {};- this.lastActiveSpeaker = null;+ this.lastDominantSpeaker = null;this.dtmfManager = null;this.somebodySupportsDTMF = false;this.authEnabled = false;@@ -745,9 +745,9 @@ function setupListeners(conference) {});conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {- if(conference.lastActiveSpeaker !== id && conference.room) {- conference.lastActiveSpeaker = id;- conference.eventEmitter.emit(JitsiConferenceEvents.ACTIVE_SPEAKER_CHANGED, id);+ if(conference.lastDominantSpeaker !== id && conference.room) {+ conference.lastDominantSpeaker = id;+ conference.eventEmitter.emit(JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED, id);}});@@ -842,9 +842,9 @@ var JitsiConferenceEvents = {*/TRACK_REMOVED: "conference.trackRemoved",/**- * The active speaker was changed.+ * The dominant speaker was changed.*/- ACTIVE_SPEAKER_CHANGED: "conference.activeSpeaker",+ DOMINANT_SPEAKER_CHANGED: "conference.dominantSpeaker",/*** A new user joinned the conference.*/@@ -2893,6 +2893,9 @@ function obtainDevices(options) {obtainDevices(options);},function (error) {+ Object.keys(options.streams).forEach(function(device) {+ RTCUtils.stopMediaStream(options.streams[device]);+ });logger.error("failed to obtain " + device + " stream - stop", error);options.errorCallback(JitsiTrackErrors.parseError(error, devices));@@ -3249,12 +3252,25 @@ var RTCUtils = {this.getUserMediaWithConstraints(options.devices,function (stream) {+ if((options.devices.indexOf("audio") !== -1 &&+ !stream.getAudioTracks().length) ||+ (options.devices.indexOf("video") !== -1 &&+ !stream.getVideoTracks().length))+ {+ self.stopMediaStream(stream);+ reject(JitsiTrackErrors.parseError(+ new Error("Unable to get the audio and " ++ "video tracks."),+ options.devices));+ return;+ }if(hasDesktop) {screenObtainer.obtainStream(function (desktopStream) {successCallback({audioVideo: stream,desktopStream: desktopStream});}, function (error) {+ self.stopMediaStream(stream);reject(JitsiTrackErrors.parseError(error,options.devices));diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex b7f9e16368..6bc4e010ad 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -606,7 +606,7 @@ UI.notifyInitiallyMuted = function () {);};-UI.markDominantSpiker = function (id) {+UI.markDominantSpeaker = function (id) {VideoLayout.onDominantSpeakerChanged(id);};diff --git a/modules/UI/audio_levels/AudioLevels.js b/modules/UI/audio_levels/AudioLevels.jsindex 0bc273ce0a..0e2284a7a5 100644--- a/modules/UI/audio_levels/AudioLevels.js+++ b/modules/UI/audio_levels/AudioLevels.js@@ -9,9 +9,9 @@ const LOCAL_LEVEL = 'local';let ASDrawContext = null;let audioLevelCanvasCache = {};-function initActiveSpeakerAudioLevels() {- let ASRadius = interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE / 2;- let ASCenter = (interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE + ASRadius) / 2;+function initDominantSpeakerAudioLevels() {+ let ASRadius = interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE / 2;+ let ASCenter = (interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE + ASRadius) / 2;// Draw a circle.ASDrawContext.arc(ASCenter, ASCenter, ASRadius, 0, 2 * Math.PI);@@ -119,8 +119,8 @@ function getVideoSpanId(id) {const AudioLevels = {init () {- ASDrawContext = $('#activeSpeakerAudioLevel')[0].getContext('2d');- initActiveSpeakerAudioLevels();+ ASDrawContext = $('#dominantSpeakerAudioLevel')[0].getContext('2d');+ initDominantSpeakerAudioLevels();},/**@@ -197,13 +197,13 @@ const AudioLevels = {if(id === largeVideoId) {window.requestAnimationFrame(function () {- AudioLevels.updateActiveSpeakerAudioLevel(audioLevel);+ AudioLevels.updateDominantSpeakerAudioLevel(audioLevel);});}},- updateActiveSpeakerAudioLevel (audioLevel) {- if($("#activeSpeaker").css("visibility") == "hidden" || ASDrawContext === null) {+ updateDominantSpeakerAudioLevel (audioLevel) {+ if($("#domiantSpeaker").css("visibility") == "hidden" || ASDrawContext === null) {return;}diff --git a/modules/UI/avatar/Avatar.js b/modules/UI/avatar/Avatar.jsindex adaa85f36b..6e6d7f9839 100644--- a/modules/UI/avatar/Avatar.js+++ b/modules/UI/avatar/Avatar.js@@ -21,10 +21,10 @@ var Avatar = {},/*** Returns image URL for the avatar to be displayed on large video area- * where current active speaker is presented.+ * where current dominant speaker is presented.* @param id id of the user for whom we want to obtain avatar URL*/- getActiveSpeakerUrl: function (id) {+ getDominantSpeakerUrl: function (id) {return this.getGravatarUrl(id, 100);},/**diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.jsindex cec5fc9877..9a5aeb8999 100644--- a/modules/UI/videolayout/LargeVideo.js+++ b/modules/UI/videolayout/LargeVideo.js@@ -8,7 +8,7 @@ import BottomToolbar from '../toolbars/BottomToolbar';const RTCBrowserType = require("../../RTC/RTCBrowserType");-const avatarSize = interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE;+const avatarSize = interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE;function getStreamId(stream) {if(!stream)@@ -163,7 +163,7 @@ class VideoContainer extends LargeContainer {this.stream = null;this.videoType = null;- this.$avatar = $('#activeSpeaker');+ this.$avatar = $('#domiantSpeaker');this.$wrapper = $('#largeVideoWrapper');if (!RTCBrowserType.isIExplorer()) {@@ -387,10 +387,10 @@ export default class LargeVideoManager {}/**- * Updates the src of the active speaker avatar+ * Updates the src of the dominant speaker avatar*/updateAvatar (thumbUrl) {- $("#activeSpeakerAvatar").attr('src', thumbUrl);+ $("#dominantSpeakerAvatar").attr('src', thumbUrl);}showAvatar (show) {