Adds speaker indicator and no longer use the display name for that purpose.
This commit is contained in:
parent
c3f9226ec8
commit
6b621654ab
|
@ -319,6 +319,27 @@
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.videocontainer>span.dominantspeakerindicator {
|
||||||
|
bottom: 0px;
|
||||||
|
left: 0px;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
z-index: 3;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #0cf;
|
||||||
|
margin: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 11pt;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#speakerindicatoricon {
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#reloadPresentation {
|
#reloadPresentation {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -5,7 +5,6 @@ var interfaceConfig = {
|
||||||
INITIAL_TOOLBAR_TIMEOUT: 20000,
|
INITIAL_TOOLBAR_TIMEOUT: 20000,
|
||||||
TOOLBAR_TIMEOUT: 4000,
|
TOOLBAR_TIMEOUT: 4000,
|
||||||
DEFAULT_REMOTE_DISPLAY_NAME: "Fellow Jitster",
|
DEFAULT_REMOTE_DISPLAY_NAME: "Fellow Jitster",
|
||||||
DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME: "speaker",
|
|
||||||
DEFAULT_LOCAL_DISPLAY_NAME: "me",
|
DEFAULT_LOCAL_DISPLAY_NAME: "me",
|
||||||
SHOW_JITSI_WATERMARK: true,
|
SHOW_JITSI_WATERMARK: true,
|
||||||
JITSI_WATERMARK_LINK: "https://jitsi.org",
|
JITSI_WATERMARK_LINK: "https://jitsi.org",
|
||||||
|
|
|
@ -334,6 +334,41 @@ 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.
|
* Sets the display name for the given video span id.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -614,16 +614,14 @@ var VideoLayout = (function (my) {
|
||||||
var members = APP.xmpp.getMembers();
|
var members = APP.xmpp.getMembers();
|
||||||
// Update the current dominant speaker.
|
// Update the current dominant speaker.
|
||||||
if (resourceJid !== currentDominantSpeaker) {
|
if (resourceJid !== currentDominantSpeaker) {
|
||||||
var currentJID = APP.xmpp.findJidFromResource(currentDominantSpeaker);
|
if (remoteVideo) {
|
||||||
var newJID = APP.xmpp.findJidFromResource(resourceJid);
|
remoteVideo.updateDominantSpeakerIndicator(true);
|
||||||
if (currentDominantSpeaker && (!members || !members[currentJID] ||
|
// let's remove the indications from the remote video if any
|
||||||
!members[currentJID].displayName) && remoteVideo) {
|
var oldSpeakerRemoteVideo
|
||||||
remoteVideo.setDisplayName(null);
|
= remoteVideos[currentDominantSpeaker];
|
||||||
}
|
if (oldSpeakerRemoteVideo) {
|
||||||
if (resourceJid && (!members || !members[newJID] ||
|
oldSpeakerRemoteVideo.updateDominantSpeakerIndicator(false);
|
||||||
!members[newJID].displayName) && remoteVideo) {
|
}
|
||||||
remoteVideo.setDisplayName(null,
|
|
||||||
interfaceConfig.DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME);
|
|
||||||
}
|
}
|
||||||
currentDominantSpeaker = resourceJid;
|
currentDominantSpeaker = resourceJid;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue