Renames all active speaker references to be called dominant speaker.
This commit is contained in:
parent
f2c5e7da41
commit
3fd68fa0fd
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -606,7 +606,7 @@ UI.notifyInitiallyMuted = function () {
|
|||
);
|
||||
};
|
||||
|
||||
UI.markDominantSpiker = function (id) {
|
||||
UI.markDominantSpeaker = function (id) {
|
||||
VideoLayout.onDominantSpeakerChanged(id);
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue