2015-07-28 21:52:32 +00:00
|
|
|
/* global $, APP, require */
|
2015-09-11 02:42:15 +00:00
|
|
|
/* jshint -W101 */
|
2015-12-14 12:26:50 +00:00
|
|
|
import Avatar from "../avatar/Avatar";
|
|
|
|
import UIUtil from "../util/UIUtil";
|
|
|
|
|
2016-02-02 17:37:06 +00:00
|
|
|
const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
|
|
|
|
|
2015-07-28 21:52:32 +00:00
|
|
|
function SmallVideo() {
|
2015-06-23 08:00:46 +00:00
|
|
|
this.isMuted = false;
|
2015-06-29 14:24:21 +00:00
|
|
|
this.hasAvatar = false;
|
2016-01-14 16:28:24 +00:00
|
|
|
this.isVideoMuted = false;
|
2016-01-29 00:33:27 +00:00
|
|
|
this.videoStream = null;
|
|
|
|
this.audioStream = null;
|
2015-06-29 14:24:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function setVisibility(selector, show) {
|
|
|
|
if (selector && selector.length > 0) {
|
|
|
|
selector.css("visibility", show ? "visible" : "hidden");
|
|
|
|
}
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
|
2016-01-29 00:33:27 +00:00
|
|
|
|
|
|
|
/* Indicates if this small video is currently visible.
|
2016-01-26 21:26:28 +00:00
|
|
|
*
|
|
|
|
* @return <tt>true</tt> if this small video isn't currently visible and
|
|
|
|
* <tt>false</tt> - otherwise.
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.isVisible = function () {
|
|
|
|
return $('#' + this.videoSpanId).is(':visible');
|
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
SmallVideo.prototype.showDisplayName = function(isShow) {
|
|
|
|
var nameSpan = $('#' + this.videoSpanId + '>span.displayname').get(0);
|
|
|
|
if (isShow) {
|
|
|
|
if (nameSpan && nameSpan.innerHTML && nameSpan.innerHTML.length)
|
|
|
|
nameSpan.setAttribute("style", "display:inline-block;");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (nameSpan)
|
|
|
|
nameSpan.setAttribute("style", "display:none;");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
SmallVideo.prototype.setDeviceAvailabilityIcons = function (devices) {
|
|
|
|
if(!this.container)
|
|
|
|
return;
|
|
|
|
|
2015-07-28 21:52:32 +00:00
|
|
|
var noMic = $("#" + this.videoSpanId + " > .noMic");
|
|
|
|
var noVideo = $("#" + this.videoSpanId + " > .noVideo");
|
|
|
|
|
|
|
|
noMic.remove();
|
|
|
|
noVideo.remove();
|
|
|
|
if (!devices.audio) {
|
2015-06-23 08:00:46 +00:00
|
|
|
this.container.appendChild(
|
2015-07-28 21:52:32 +00:00
|
|
|
document.createElement("div")).setAttribute("class", "noMic");
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
|
2015-07-28 21:52:32 +00:00
|
|
|
if (!devices.video) {
|
2015-06-23 08:00:46 +00:00
|
|
|
this.container.appendChild(
|
2015-07-28 21:52:32 +00:00
|
|
|
document.createElement("div")).setAttribute("class", "noVideo");
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
|
2015-07-28 21:52:32 +00:00
|
|
|
if (!devices.audio && !devices.video) {
|
|
|
|
noMic.css("background-position", "75%");
|
|
|
|
noVideo.css("background-position", "25%");
|
|
|
|
noVideo.css("background-color", "transparent");
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-05 12:09:12 +00:00
|
|
|
/**
|
|
|
|
* Sets the type of the video displayed by this instance.
|
2015-12-29 22:30:50 +00:00
|
|
|
* @param videoType 'camera' or 'desktop'
|
2015-08-05 12:09:12 +00:00
|
|
|
*/
|
|
|
|
SmallVideo.prototype.setVideoType = function (videoType) {
|
|
|
|
this.videoType = videoType;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the type of the video displayed by this instance.
|
|
|
|
* @returns {String} 'camera', 'screen' or undefined.
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.getVideoType = function () {
|
|
|
|
return this.videoType;
|
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
/**
|
|
|
|
* Shows the presence status message for the given video.
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.setPresenceStatus = function (statusMsg) {
|
|
|
|
if (!this.container) {
|
|
|
|
// No container
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var statusSpan = $('#' + this.videoSpanId + '>span.status');
|
|
|
|
if (!statusSpan.length) {
|
|
|
|
//Add status span
|
|
|
|
statusSpan = document.createElement('span');
|
|
|
|
statusSpan.className = 'status';
|
|
|
|
statusSpan.id = this.videoSpanId + '_status';
|
|
|
|
$('#' + this.videoSpanId)[0].appendChild(statusSpan);
|
|
|
|
|
|
|
|
statusSpan = $('#' + this.videoSpanId + '>span.status');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Display status
|
|
|
|
if (statusMsg && statusMsg.length) {
|
|
|
|
$('#' + this.videoSpanId + '_status').text(statusMsg);
|
|
|
|
statusSpan.get(0).setAttribute("style", "display:inline-block;");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Hide
|
|
|
|
statusSpan.get(0).setAttribute("style", "display:none;");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-10-01 20:10:55 +00:00
|
|
|
* Creates an audio or video element for a particular MediaStream.
|
2015-06-23 08:00:46 +00:00
|
|
|
*/
|
2015-10-01 20:10:55 +00:00
|
|
|
SmallVideo.createStreamElement = function (stream) {
|
2015-12-14 12:26:50 +00:00
|
|
|
let isVideo = stream.isVideoTrack();
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
let element = isVideo
|
|
|
|
? document.createElement('video')
|
2015-06-23 08:00:46 +00:00
|
|
|
: document.createElement('audio');
|
2015-10-28 17:04:34 +00:00
|
|
|
if (isVideo) {
|
|
|
|
element.setAttribute("muted", "true");
|
|
|
|
}
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2016-02-02 21:50:02 +00:00
|
|
|
RTCUIHelper.setAutoPlay(element, true);
|
2015-10-01 20:10:55 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
element.id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') + stream.getId();
|
2015-10-01 20:10:55 +00:00
|
|
|
|
2015-11-06 21:59:38 +00:00
|
|
|
element.onplay = function () {
|
2015-10-06 21:36:41 +00:00
|
|
|
console.log("(TIME) Render " + (isVideo ? 'video' : 'audio') + ":\t",
|
|
|
|
window.performance.now());
|
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
element.oncontextmenu = function () { return false; };
|
|
|
|
|
|
|
|
return element;
|
|
|
|
};
|
|
|
|
|
2015-08-21 14:37:57 +00:00
|
|
|
/**
|
|
|
|
* Configures hoverIn/hoverOut handlers.
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.bindHoverHandler = function () {
|
|
|
|
// Add hover handler
|
|
|
|
var self = this;
|
|
|
|
$(this.container).hover(
|
|
|
|
function () {
|
|
|
|
self.showDisplayName(true);
|
|
|
|
},
|
|
|
|
function () {
|
|
|
|
// If the video has been "pinned" by the user we want to
|
|
|
|
// keep the display name on place.
|
2015-12-25 16:55:45 +00:00
|
|
|
if (!self.VideoLayout.isLargeVideoVisible() ||
|
|
|
|
!self.VideoLayout.isCurrentlyOnLarge(self.id))
|
2015-08-21 14:37:57 +00:00
|
|
|
self.showDisplayName(false);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
/**
|
|
|
|
* Updates the data for the indicator
|
|
|
|
* @param id the id of the indicator
|
|
|
|
* @param percent the percent for connection quality
|
|
|
|
* @param object the data
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.updateStatsIndicator = function (percent, object) {
|
|
|
|
if(this.connectionIndicator)
|
|
|
|
this.connectionIndicator.updateConnectionQuality(percent, object);
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
SmallVideo.prototype.hideIndicator = function () {
|
|
|
|
if(this.connectionIndicator)
|
|
|
|
this.connectionIndicator.hideIndicator();
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shows audio muted indicator over small videos.
|
|
|
|
* @param {string} isMuted
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.showAudioIndicator = function(isMuted) {
|
|
|
|
var audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted');
|
|
|
|
|
2015-06-30 11:34:11 +00:00
|
|
|
if (!isMuted) {
|
2015-06-23 08:00:46 +00:00
|
|
|
if (audioMutedSpan.length > 0) {
|
|
|
|
audioMutedSpan.popover('hide');
|
|
|
|
audioMutedSpan.remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2015-09-11 03:26:29 +00:00
|
|
|
if (!audioMutedSpan.length) {
|
2015-06-23 08:00:46 +00:00
|
|
|
audioMutedSpan = document.createElement('span');
|
|
|
|
audioMutedSpan.className = 'audioMuted';
|
|
|
|
UIUtil.setTooltip(audioMutedSpan,
|
|
|
|
"videothumbnail.mute",
|
|
|
|
"top");
|
|
|
|
|
|
|
|
this.container.appendChild(audioMutedSpan);
|
|
|
|
APP.translation.translateElement($('#' + this.videoSpanId + " > span"));
|
|
|
|
var mutedIndicator = document.createElement('i');
|
|
|
|
mutedIndicator.className = 'icon-mic-disabled';
|
|
|
|
audioMutedSpan.appendChild(mutedIndicator);
|
|
|
|
|
|
|
|
}
|
|
|
|
this.updateIconPositions();
|
|
|
|
}
|
|
|
|
this.isMuted = isMuted;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2016-01-14 16:28:24 +00:00
|
|
|
* Shows video muted indicator over small videos and disables/enables avatar
|
|
|
|
* if video muted.
|
2015-06-23 08:00:46 +00:00
|
|
|
*/
|
2016-01-14 16:28:24 +00:00
|
|
|
SmallVideo.prototype.setMutedView = function(isMuted) {
|
|
|
|
this.isVideoMuted = isMuted;
|
|
|
|
this.updateView();
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
var videoMutedSpan = $('#' + this.videoSpanId + '>span.videoMuted');
|
|
|
|
|
|
|
|
if (isMuted === false) {
|
|
|
|
if (videoMutedSpan.length > 0) {
|
|
|
|
videoMutedSpan.remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2015-09-11 03:26:29 +00:00
|
|
|
if (!videoMutedSpan.length) {
|
2015-06-23 08:00:46 +00:00
|
|
|
videoMutedSpan = document.createElement('span');
|
|
|
|
videoMutedSpan.className = 'videoMuted';
|
|
|
|
|
|
|
|
this.container.appendChild(videoMutedSpan);
|
|
|
|
|
|
|
|
var mutedIndicator = document.createElement('i');
|
|
|
|
mutedIndicator.className = 'icon-camera-disabled';
|
|
|
|
UIUtil.setTooltip(mutedIndicator,
|
|
|
|
"videothumbnail.videomute",
|
|
|
|
"top");
|
|
|
|
videoMutedSpan.appendChild(mutedIndicator);
|
|
|
|
//translate texts for muted indicator
|
|
|
|
APP.translation.translateElement($('#' + this.videoSpanId + " > span > i"));
|
|
|
|
}
|
|
|
|
|
|
|
|
this.updateIconPositions();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
SmallVideo.prototype.updateIconPositions = function () {
|
|
|
|
var audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted');
|
|
|
|
var connectionIndicator = $('#' + this.videoSpanId + '>div.connectionindicator');
|
|
|
|
var videoMutedSpan = $('#' + this.videoSpanId + '>span.videoMuted');
|
2015-07-28 21:52:32 +00:00
|
|
|
if(connectionIndicator.length > 0 &&
|
|
|
|
connectionIndicator[0].style.display != "none") {
|
2015-06-23 08:00:46 +00:00
|
|
|
audioMutedSpan.css({right: "23px"});
|
|
|
|
videoMutedSpan.css({right: ((audioMutedSpan.length > 0? 23 : 0) + 30) + "px"});
|
2015-07-28 21:52:32 +00:00
|
|
|
} else {
|
2015-06-23 08:00:46 +00:00
|
|
|
audioMutedSpan.css({right: "0px"});
|
|
|
|
videoMutedSpan.css({right: (audioMutedSpan.length > 0? 30 : 0) + "px"});
|
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the element indicating the moderator(owner) of the conference.
|
|
|
|
*
|
|
|
|
* @param parentElement the parent element where the owner indicator will
|
|
|
|
* be added
|
|
|
|
*/
|
|
|
|
SmallVideo.prototype.createModeratorIndicatorElement = function () {
|
|
|
|
// Show moderator indicator
|
|
|
|
var indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
|
|
|
|
|
|
|
|
if (!indicatorSpan || indicatorSpan.length === 0) {
|
|
|
|
indicatorSpan = document.createElement('span');
|
|
|
|
indicatorSpan.className = 'focusindicator';
|
|
|
|
|
|
|
|
this.container.appendChild(indicatorSpan);
|
|
|
|
indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (indicatorSpan.children().length !== 0)
|
|
|
|
return;
|
|
|
|
var moderatorIndicator = document.createElement('i');
|
|
|
|
moderatorIndicator.className = 'fa fa-star';
|
|
|
|
indicatorSpan[0].appendChild(moderatorIndicator);
|
|
|
|
|
|
|
|
UIUtil.setTooltip(indicatorSpan[0],
|
|
|
|
"videothumbnail.moderator",
|
|
|
|
"top");
|
|
|
|
|
|
|
|
//translates text in focus indicators
|
|
|
|
APP.translation.translateElement($('#' + this.videoSpanId + ' .focusindicator'));
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-21 14:26:39 +00:00
|
|
|
SmallVideo.prototype.selectVideoElement = function () {
|
2016-02-02 17:37:06 +00:00
|
|
|
return $(RTCUIHelper.findVideoElement($('#' + this.videoSpanId)[0]));
|
2015-08-21 14:26:39 +00:00
|
|
|
};
|
|
|
|
|
2015-07-28 21:52:32 +00:00
|
|
|
SmallVideo.prototype.focus = function(isFocused) {
|
2015-06-23 08:00:46 +00:00
|
|
|
if(!isFocused) {
|
|
|
|
this.container.classList.remove("videoContainerFocused");
|
2015-07-28 21:52:32 +00:00
|
|
|
} else {
|
2015-06-23 08:00:46 +00:00
|
|
|
this.container.classList.add("videoContainerFocused");
|
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
SmallVideo.prototype.hasVideo = function () {
|
2015-08-21 14:26:39 +00:00
|
|
|
return this.selectVideoElement().length !== 0;
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-06-29 14:24:21 +00:00
|
|
|
/**
|
2016-01-14 16:28:24 +00:00
|
|
|
* Hides or shows the user's avatar.
|
2016-01-14 19:30:56 +00:00
|
|
|
* This update assumes that large video had been updated and we will
|
|
|
|
* reflect it on this small video.
|
2016-01-14 16:28:24 +00:00
|
|
|
*
|
2015-06-29 14:24:21 +00:00
|
|
|
* @param show whether we should show the avatar or not
|
|
|
|
* video because there is no dominant speaker and no focused speaker
|
|
|
|
*/
|
2016-01-14 16:28:24 +00:00
|
|
|
SmallVideo.prototype.updateView = function () {
|
2015-07-20 17:32:04 +00:00
|
|
|
if (!this.hasAvatar) {
|
2015-12-14 12:26:50 +00:00
|
|
|
if (this.id) {
|
2015-07-20 17:32:04 +00:00
|
|
|
// Init avatar
|
2016-01-19 23:10:44 +00:00
|
|
|
this.avatarChanged(Avatar.getAvatarUrl(this.id));
|
2015-07-20 17:32:04 +00:00
|
|
|
} else {
|
2015-12-14 12:26:50 +00:00
|
|
|
console.error("Unable to init avatar - no id", this);
|
2015-07-20 17:32:04 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
let video = this.selectVideoElement();
|
2015-08-21 14:26:39 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
let avatar = $(`#avatar_${this.id}`);
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2016-01-14 19:30:56 +00:00
|
|
|
var isCurrentlyOnLarge = this.VideoLayout.isCurrentlyOnLarge(this.id);
|
|
|
|
|
|
|
|
var showVideo = !this.isVideoMuted && !isCurrentlyOnLarge;
|
2016-01-14 16:28:24 +00:00
|
|
|
var showAvatar;
|
2016-01-14 19:30:56 +00:00
|
|
|
if ((!this.isLocal
|
|
|
|
&& !this.VideoLayout.isInLastN(this.id))
|
|
|
|
|| this.isVideoMuted) {
|
2016-01-14 16:28:24 +00:00
|
|
|
showAvatar = true;
|
|
|
|
} else {
|
|
|
|
// We want to show the avatar when the video is muted or not exists
|
|
|
|
// that is when 'true' or 'null' is returned
|
2016-01-29 00:33:27 +00:00
|
|
|
showAvatar = !this.videoStream || this.videoStream.isMuted();
|
2016-01-14 16:28:24 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 19:30:56 +00:00
|
|
|
showAvatar = showAvatar && !isCurrentlyOnLarge;
|
|
|
|
|
2016-01-14 16:28:24 +00:00
|
|
|
if (video && video.length > 0) {
|
|
|
|
setVisibility(video, showVideo);
|
2015-06-29 14:24:21 +00:00
|
|
|
}
|
2016-01-14 16:28:24 +00:00
|
|
|
setVisibility(avatar, showAvatar);
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2016-01-14 16:28:24 +00:00
|
|
|
var showDisplayName = !showVideo && !showAvatar;
|
2015-12-25 16:55:45 +00:00
|
|
|
|
2016-01-14 16:28:24 +00:00
|
|
|
if (showDisplayName) {
|
|
|
|
this.showDisplayName(this.VideoLayout.isLargeVideoVisible());
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
this.showDisplayName(false);
|
2015-06-29 14:24:21 +00:00
|
|
|
}
|
2015-07-15 10:14:34 +00:00
|
|
|
};
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2016-01-19 23:10:44 +00:00
|
|
|
SmallVideo.prototype.avatarChanged = function (avatarUrl) {
|
2015-06-29 14:24:21 +00:00
|
|
|
var thumbnail = $('#' + this.videoSpanId);
|
2015-12-14 12:26:50 +00:00
|
|
|
var avatar = $('#avatar_' + this.id);
|
2015-06-29 14:24:21 +00:00
|
|
|
this.hasAvatar = true;
|
|
|
|
|
|
|
|
// set the avatar in the thumbnail
|
|
|
|
if (avatar && avatar.length > 0) {
|
2016-01-19 23:10:44 +00:00
|
|
|
avatar[0].src = avatarUrl;
|
2015-06-29 14:24:21 +00:00
|
|
|
} else {
|
|
|
|
if (thumbnail && thumbnail.length > 0) {
|
|
|
|
avatar = document.createElement('img');
|
2015-12-14 12:26:50 +00:00
|
|
|
avatar.id = 'avatar_' + this.id;
|
2015-06-29 14:24:21 +00:00
|
|
|
avatar.className = 'userAvatar';
|
2016-01-19 23:10:44 +00:00
|
|
|
avatar.src = avatarUrl;
|
2015-06-29 14:24:21 +00:00
|
|
|
thumbnail.append(avatar);
|
|
|
|
}
|
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2016-02-08 21:41:04 +00:00
|
|
|
/**
|
|
|
|
* 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");
|
|
|
|
};
|
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
export default SmallVideo;
|