2015-12-14 12:26:50 +00:00
|
|
|
/* global $, APP, interfaceConfig */
|
|
|
|
|
|
|
|
import ConnectionIndicator from './ConnectionIndicator';
|
|
|
|
|
|
|
|
import SmallVideo from "./SmallVideo";
|
|
|
|
import AudioLevels from "../audio_levels/AudioLevels";
|
|
|
|
import UIUtils from "../util/UIUtil";
|
|
|
|
import UIEvents from '../../../service/UI/UIEvents';
|
|
|
|
|
|
|
|
function RemoteVideo(id, VideoLayout, emitter) {
|
|
|
|
this.id = id;
|
|
|
|
this.emitter = emitter;
|
|
|
|
this.videoSpanId = `participant_${id}`;
|
2015-06-23 08:00:46 +00:00
|
|
|
this.VideoLayout = VideoLayout;
|
|
|
|
this.addRemoteVideoContainer();
|
2015-12-14 12:26:50 +00:00
|
|
|
this.connectionIndicator = new ConnectionIndicator(this, id);
|
2015-06-23 08:00:46 +00:00
|
|
|
this.setDisplayName();
|
|
|
|
var nickfield = document.createElement('span');
|
|
|
|
nickfield.className = "nick";
|
2015-12-14 12:26:50 +00:00
|
|
|
nickfield.appendChild(document.createTextNode(id));
|
2015-06-23 08:00:46 +00:00
|
|
|
this.container.appendChild(nickfield);
|
2015-08-21 14:37:57 +00:00
|
|
|
this.bindHoverHandler();
|
2015-06-23 08:00:46 +00:00
|
|
|
this.flipX = false;
|
2015-07-15 10:14:34 +00:00
|
|
|
this.isLocal = false;
|
2016-01-14 16:28:24 +00:00
|
|
|
SmallVideo.call(this);
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RemoteVideo.prototype = Object.create(SmallVideo.prototype);
|
|
|
|
RemoteVideo.prototype.constructor = RemoteVideo;
|
|
|
|
|
|
|
|
RemoteVideo.prototype.addRemoteVideoContainer = function() {
|
|
|
|
this.container = RemoteVideo.createContainer(this.videoSpanId);
|
2015-12-14 12:26:50 +00:00
|
|
|
if (APP.conference.isModerator) {
|
2015-06-23 08:00:46 +00:00
|
|
|
this.addRemoteVideoMenu();
|
2015-12-14 12:26:50 +00:00
|
|
|
}
|
2015-12-30 10:55:51 +00:00
|
|
|
let {thumbWidth, thumbHeight} = this.VideoLayout.calculateThumbnailSize();
|
|
|
|
AudioLevels.updateAudioLevelCanvas(this.id, thumbWidth, thumbHeight);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
return this.container;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-12-14 12:26:50 +00:00
|
|
|
* Adds the remote video menu element for the given <tt>id</tt> in the
|
2015-06-23 08:00:46 +00:00
|
|
|
* given <tt>parentElement</tt>.
|
|
|
|
*
|
2015-12-14 12:26:50 +00:00
|
|
|
* @param id the id indicating the video for which we're adding a menu.
|
2015-06-23 08:00:46 +00:00
|
|
|
* @param parentElement the parent element where this menu will be added
|
|
|
|
*/
|
|
|
|
|
2015-08-10 17:59:12 +00:00
|
|
|
if (!interfaceConfig.filmStripOnly) {
|
2015-08-06 23:34:40 +00:00
|
|
|
RemoteVideo.prototype.addRemoteVideoMenu = function () {
|
|
|
|
var spanElement = document.createElement('span');
|
|
|
|
spanElement.className = 'remotevideomenu';
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
this.container.appendChild(spanElement);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
var menuElement = document.createElement('i');
|
|
|
|
menuElement.className = 'fa fa-angle-down';
|
|
|
|
menuElement.title = 'Remote user controls';
|
|
|
|
spanElement.appendChild(menuElement);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
var popupmenuElement = document.createElement('ul');
|
|
|
|
popupmenuElement.className = 'popupmenu';
|
2015-12-14 12:26:50 +00:00
|
|
|
popupmenuElement.id = `remote_popupmenu_${this.id}`;
|
2015-08-06 23:34:40 +00:00
|
|
|
spanElement.appendChild(popupmenuElement);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
var muteMenuItem = document.createElement('li');
|
|
|
|
var muteLinkItem = document.createElement('a');
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
var mutedIndicator = "<i style='float:left;' " +
|
|
|
|
"class='icon-mic-disabled'></i>";
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-08-06 23:34:40 +00:00
|
|
|
if (!this.isMuted) {
|
|
|
|
muteLinkItem.innerHTML = mutedIndicator +
|
|
|
|
" <div style='width: 90px;margin-left: 20px;' " +
|
|
|
|
"data-i18n='videothumbnail.domute'></div>";
|
|
|
|
muteLinkItem.className = 'mutelink';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
muteLinkItem.innerHTML = mutedIndicator +
|
|
|
|
" <div style='width: 90px;margin-left: 20px;' " +
|
|
|
|
"data-i18n='videothumbnail.muted'></div>";
|
|
|
|
muteLinkItem.className = 'mutelink disabled';
|
|
|
|
}
|
|
|
|
|
2016-01-28 14:36:55 +00:00
|
|
|
muteLinkItem.onclick = (event) => {
|
2015-09-11 03:26:29 +00:00
|
|
|
if ($(this).attr('disabled')) {
|
2015-08-06 23:34:40 +00:00
|
|
|
event.preventDefault();
|
|
|
|
}
|
2016-01-28 14:36:55 +00:00
|
|
|
var isMute = !!this.isMuted;
|
|
|
|
this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id);
|
2015-08-06 23:34:40 +00:00
|
|
|
|
|
|
|
popupmenuElement.setAttribute('style', 'display:none;');
|
|
|
|
|
|
|
|
if (isMute) {
|
|
|
|
this.innerHTML = mutedIndicator +
|
|
|
|
" <div style='width: 90px;margin-left: 20px;' " +
|
|
|
|
"data-i18n='videothumbnail.muted'></div>";
|
|
|
|
this.className = 'mutelink disabled';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
this.innerHTML = mutedIndicator +
|
|
|
|
" <div style='width: 90px;margin-left: 20px;' " +
|
|
|
|
"data-i18n='videothumbnail.domute'></div>";
|
|
|
|
this.className = 'mutelink';
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
muteMenuItem.appendChild(muteLinkItem);
|
|
|
|
popupmenuElement.appendChild(muteMenuItem);
|
|
|
|
|
|
|
|
var ejectIndicator = "<i style='float:left;' class='fa fa-eject'></i>";
|
|
|
|
|
|
|
|
var ejectMenuItem = document.createElement('li');
|
|
|
|
var ejectLinkItem = document.createElement('a');
|
|
|
|
var ejectText = "<div style='width: 90px;margin-left: 20px;' " +
|
|
|
|
"data-i18n='videothumbnail.kick'> </div>";
|
|
|
|
ejectLinkItem.innerHTML = ejectIndicator + ' ' + ejectText;
|
2016-01-28 14:36:55 +00:00
|
|
|
ejectLinkItem.onclick = (event) => {
|
|
|
|
this.emitter.emit(UIEvents.USER_KICKED, this.id);
|
2015-08-06 23:34:40 +00:00
|
|
|
popupmenuElement.setAttribute('style', 'display:none;');
|
|
|
|
};
|
|
|
|
|
|
|
|
ejectMenuItem.appendChild(ejectLinkItem);
|
|
|
|
popupmenuElement.appendChild(ejectMenuItem);
|
|
|
|
|
|
|
|
var paddingSpan = document.createElement('span');
|
|
|
|
paddingSpan.className = 'popupmenuPadding';
|
|
|
|
popupmenuElement.appendChild(paddingSpan);
|
|
|
|
APP.translation.translateElement(
|
|
|
|
$("#" + popupmenuElement.id + " > li > a > div"));
|
|
|
|
};
|
|
|
|
|
|
|
|
} else {
|
2015-09-11 03:05:53 +00:00
|
|
|
RemoteVideo.prototype.addRemoteVideoMenu = function() {};
|
2015-08-06 23:34:40 +00:00
|
|
|
}
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes the remote stream element corresponding to the given stream and
|
|
|
|
* parent container.
|
|
|
|
*
|
2016-01-29 00:33:27 +00:00
|
|
|
* @param stream the MediaStream
|
2015-06-23 08:00:46 +00:00
|
|
|
* @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
|
|
|
|
*/
|
2015-07-28 21:52:32 +00:00
|
|
|
RemoteVideo.prototype.removeRemoteStreamElement =
|
|
|
|
function (stream, isVideo, id) {
|
2015-06-23 08:00:46 +00:00
|
|
|
if (!this.container)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
var select = null;
|
|
|
|
if (isVideo) {
|
|
|
|
select = $('#' + id);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
select = $('#' + this.videoSpanId + '>audio');
|
|
|
|
|
|
|
|
select.remove();
|
|
|
|
|
2015-07-30 08:23:21 +00:00
|
|
|
console.info((isVideo ? "Video" : "Audio") +
|
2015-12-14 12:26:50 +00:00
|
|
|
" removed " + this.id, select);
|
2015-07-30 08:23:21 +00:00
|
|
|
|
2015-06-29 14:24:21 +00:00
|
|
|
if (isVideo)
|
2015-12-14 12:26:50 +00:00
|
|
|
this.VideoLayout.updateRemovedVideo(this.id);
|
2015-06-23 08:00:46 +00:00
|
|
|
};
|
|
|
|
|
2015-07-29 16:41:22 +00:00
|
|
|
/**
|
|
|
|
* Removes RemoteVideo from the page.
|
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.remove = function () {
|
2015-12-14 12:26:50 +00:00
|
|
|
console.log("Remove thumbnail", this.id);
|
2015-07-29 16:41:22 +00:00
|
|
|
this.removeConnectionIndicator();
|
2015-10-01 22:46:42 +00:00
|
|
|
// Make sure that the large video is updated if are removing its
|
|
|
|
// corresponding small video.
|
2015-12-14 12:26:50 +00:00
|
|
|
this.VideoLayout.updateRemovedVideo(this.id);
|
2015-07-29 16:41:22 +00:00
|
|
|
// Remove whole container
|
2015-12-14 12:26:50 +00:00
|
|
|
if (this.container.parentNode) {
|
2015-07-29 16:41:22 +00:00
|
|
|
this.container.parentNode.removeChild(this.container);
|
2015-12-14 12:26:50 +00:00
|
|
|
}
|
2015-07-29 16:41:22 +00:00
|
|
|
};
|
|
|
|
|
2016-02-01 21:00:51 +00:00
|
|
|
RemoteVideo.prototype.waitForPlayback = function (streamElement, stream) {
|
2015-07-15 12:01:36 +00:00
|
|
|
|
2015-11-06 21:59:38 +00:00
|
|
|
var webRtcStream = stream.getOriginalStream();
|
2015-12-14 12:26:50 +00:00
|
|
|
var isVideo = stream.isVideoTrack();
|
2015-11-06 21:59:38 +00:00
|
|
|
if (!isVideo || webRtcStream.id === 'mixedmslabel') {
|
2015-07-15 12:01:36 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
// Register 'onplaying' listener to trigger 'videoactive' on VideoLayout
|
|
|
|
// when video playback starts
|
|
|
|
var onPlayingHandler = function () {
|
2016-02-01 21:00:51 +00:00
|
|
|
self.VideoLayout.videoactive(streamElement, self.id);
|
|
|
|
streamElement.onplaying = null;
|
2015-07-15 12:01:36 +00:00
|
|
|
};
|
2016-02-01 21:00:51 +00:00
|
|
|
streamElement.onplaying = onPlayingHandler;
|
2015-07-15 12:01:36 +00:00
|
|
|
};
|
|
|
|
|
2016-02-01 22:08:15 +00:00
|
|
|
/**
|
|
|
|
* Checks whether or not video stream exists and has started for this
|
|
|
|
* RemoteVideo instance. This is checked by trying to select video element in
|
|
|
|
* this container and checking if 'currentTime' field's value is greater than 0.
|
|
|
|
*
|
|
|
|
* @returns {*|boolean} true if this RemoteVideo has active video stream running
|
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.hasVideoStarted = function () {
|
|
|
|
var videoSelector = this.selectVideoElement();
|
|
|
|
return videoSelector.length && videoSelector[0].currentTime > 0;
|
|
|
|
};
|
|
|
|
|
2015-10-01 20:10:55 +00:00
|
|
|
RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
|
2015-12-14 12:26:50 +00:00
|
|
|
if (!this.container) {
|
2015-06-23 08:00:46 +00:00
|
|
|
return;
|
2015-12-14 12:26:50 +00:00
|
|
|
}
|
2015-06-23 08:00:46 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
let isVideo = stream.isVideoTrack();
|
2016-01-29 00:33:27 +00:00
|
|
|
isVideo ? this.videoStream = stream : this.audioStream = stream;
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
// Add click handler.
|
2015-12-14 12:26:50 +00:00
|
|
|
let onClickHandler = (event) => {
|
2016-01-28 14:36:55 +00:00
|
|
|
let source = event.target || event.srcElement;
|
2015-07-20 17:32:04 +00:00
|
|
|
|
2016-01-28 14:36:55 +00:00
|
|
|
// ignore click if it was done in popup menu
|
|
|
|
if ($(source).parents('.popupmenu').length === 0) {
|
|
|
|
this.VideoLayout.handleVideoThumbClicked(false, this.id);
|
|
|
|
}
|
2015-07-20 17:32:04 +00:00
|
|
|
|
2015-07-10 09:57:20 +00:00
|
|
|
// On IE we need to populate this handler on video <object>
|
|
|
|
// and it does not give event instance as an argument,
|
|
|
|
// so we check here for methods.
|
|
|
|
if (event.stopPropagation && event.preventDefault) {
|
|
|
|
event.stopPropagation();
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
2015-06-23 08:00:46 +00:00
|
|
|
return false;
|
|
|
|
};
|
2015-07-10 09:57:20 +00:00
|
|
|
this.container.onclick = onClickHandler;
|
2016-01-22 22:37:33 +00:00
|
|
|
|
|
|
|
if(!stream.getOriginalStream())
|
|
|
|
return;
|
|
|
|
|
|
|
|
let streamElement = SmallVideo.createStreamElement(stream);
|
|
|
|
let newElementId = streamElement.id;
|
|
|
|
|
|
|
|
// Put new stream element always in front
|
|
|
|
UIUtils.prependChild(this.container, streamElement);
|
|
|
|
|
2016-02-01 21:00:51 +00:00
|
|
|
// If we hide element when Temasys plugin is used then
|
|
|
|
// we'll never receive 'onplay' event and other logic won't work as expected
|
2016-02-02 21:50:02 +00:00
|
|
|
// NOTE: hiding will not have effect when Temasys plugin is in use, as
|
|
|
|
// calling attach will show it back
|
|
|
|
$(streamElement).hide();
|
2016-01-22 22:37:33 +00:00
|
|
|
|
2016-01-29 00:33:27 +00:00
|
|
|
// If the container is currently visible we attach the stream to the element.
|
2016-01-22 22:37:33 +00:00
|
|
|
if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
|
2016-02-01 21:00:51 +00:00
|
|
|
this.waitForPlayback(streamElement, stream);
|
2016-01-22 22:37:33 +00:00
|
|
|
|
2016-02-01 21:00:51 +00:00
|
|
|
streamElement = stream.attach(streamElement);
|
2016-01-22 22:37:33 +00:00
|
|
|
}
|
|
|
|
|
2016-02-01 21:00:51 +00:00
|
|
|
$(streamElement).click(onClickHandler);
|
2015-07-10 09:57:20 +00:00
|
|
|
},
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
2015-12-14 12:26:50 +00:00
|
|
|
* Show/hide peer container for the given id.
|
2015-06-23 08:00:46 +00:00
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.showPeerContainer = function (state) {
|
|
|
|
if (!this.container)
|
|
|
|
return;
|
|
|
|
|
|
|
|
var isHide = state === 'hide';
|
|
|
|
var resizeThumbnails = false;
|
|
|
|
|
|
|
|
if (!isHide) {
|
|
|
|
if (!$(this.container).is(':visible')) {
|
|
|
|
resizeThumbnails = true;
|
|
|
|
$(this.container).show();
|
|
|
|
}
|
2016-01-14 16:28:24 +00:00
|
|
|
// Call updateView, so that we'll figure out if avatar
|
2015-09-17 16:31:26 +00:00
|
|
|
// should be displayed based on video muted status and whether or not
|
|
|
|
// it's in the lastN set
|
2016-01-14 16:28:24 +00:00
|
|
|
this.updateView();
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
else if ($(this.container).is(':visible') && isHide)
|
|
|
|
{
|
|
|
|
resizeThumbnails = true;
|
|
|
|
$(this.container).hide();
|
|
|
|
if(this.connectionIndicator)
|
|
|
|
this.connectionIndicator.hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (resizeThumbnails) {
|
|
|
|
this.VideoLayout.resizeThumbnails();
|
|
|
|
}
|
|
|
|
|
|
|
|
// We want to be able to pin a participant from the contact list, even
|
|
|
|
// if he's not in the lastN set!
|
2015-12-14 12:26:50 +00:00
|
|
|
// ContactList.setClickable(id, !isHide);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-12-29 12:41:43 +00:00
|
|
|
RemoteVideo.prototype.updateResolution = function (resolution) {
|
|
|
|
if (this.connectionIndicator) {
|
|
|
|
this.connectionIndicator.updateResolution(resolution);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
RemoteVideo.prototype.removeConnectionIndicator = function () {
|
2015-07-29 16:41:22 +00:00
|
|
|
if (this.connectionIndicator)
|
2015-06-23 08:00:46 +00:00
|
|
|
this.connectionIndicator.remove();
|
2015-07-29 16:41:22 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
RemoteVideo.prototype.hideConnectionIndicator = function () {
|
2015-07-29 16:41:22 +00:00
|
|
|
if (this.connectionIndicator)
|
2015-06-23 08:00:46 +00:00
|
|
|
this.connectionIndicator.hide();
|
2015-07-29 16:41:22 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the remote video menu.
|
|
|
|
*
|
2015-12-14 12:26:50 +00:00
|
|
|
* @param id the id indicating the video for which we're adding a menu.
|
2015-06-23 08:00:46 +00:00
|
|
|
* @param isMuted indicates the current mute state
|
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted) {
|
2015-12-14 12:26:50 +00:00
|
|
|
var muteMenuItem = $(`#remote_popupmenu_${this.id}>li>a.mutelink`);
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
var mutedIndicator = "<i class='icon-mic-disabled'></i>";
|
|
|
|
|
|
|
|
if (muteMenuItem.length) {
|
|
|
|
var muteLink = muteMenuItem.get(0);
|
|
|
|
|
2015-11-04 23:23:49 +00:00
|
|
|
if (isMuted) {
|
2015-06-23 08:00:46 +00:00
|
|
|
muteLink.innerHTML = mutedIndicator + ' Muted';
|
|
|
|
muteLink.className = 'mutelink disabled';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
muteLink.innerHTML = mutedIndicator + ' Mute';
|
|
|
|
muteLink.className = 'mutelink';
|
|
|
|
}
|
|
|
|
}
|
2015-07-20 17:32:04 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the display name for the given video span id.
|
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.setDisplayName = function(displayName, key) {
|
|
|
|
|
|
|
|
if (!this.container) {
|
2015-07-28 21:52:32 +00:00
|
|
|
console.warn( "Unable to set displayName - " + this.videoSpanId +
|
|
|
|
" does not exist");
|
2015-06-23 08:00:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var nameSpan = $('#' + this.videoSpanId + '>span.displayname');
|
|
|
|
|
|
|
|
// If we already have a display name for this video.
|
|
|
|
if (nameSpan.length > 0) {
|
2015-07-28 21:52:32 +00:00
|
|
|
if (displayName && displayName.length > 0) {
|
2015-06-23 08:00:46 +00:00
|
|
|
$('#' + this.videoSpanId + '_name').html(displayName);
|
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
else if (key && key.length > 0) {
|
2015-07-03 09:34:05 +00:00
|
|
|
var nameHtml = APP.translation.generateTranslationHTML(key);
|
2015-06-23 08:00:46 +00:00
|
|
|
$('#' + this.videoSpanId + '_name').html(nameHtml);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$('#' + this.videoSpanId + '_name').text(
|
|
|
|
interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME);
|
|
|
|
} else {
|
|
|
|
nameSpan = document.createElement('span');
|
|
|
|
nameSpan.className = 'displayname';
|
|
|
|
$('#' + this.videoSpanId)[0].appendChild(nameSpan);
|
|
|
|
|
|
|
|
if (displayName && displayName.length > 0) {
|
2016-01-14 22:34:22 +00:00
|
|
|
nameSpan.innerHTML = displayName;
|
2015-06-23 08:00:46 +00:00
|
|
|
}
|
|
|
|
else
|
2016-01-14 22:34:22 +00:00
|
|
|
nameSpan.innerHTML = interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
|
2015-06-23 08:00:46 +00:00
|
|
|
nameSpan.id = this.videoSpanId + '_name';
|
|
|
|
}
|
2015-07-28 21:52:32 +00:00
|
|
|
};
|
2015-06-23 08:00:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes remote video menu element from video element identified by
|
|
|
|
* given <tt>videoElementId</tt>.
|
|
|
|
*
|
|
|
|
* @param videoElementId the id of local or remote video element.
|
|
|
|
*/
|
|
|
|
RemoteVideo.prototype.removeRemoteVideoMenu = function() {
|
|
|
|
var menuSpan = $('#' + this.videoSpanId + '>span.remotevideomenu');
|
|
|
|
if (menuSpan.length) {
|
|
|
|
menuSpan.remove();
|
|
|
|
}
|
2015-07-20 17:32:04 +00:00
|
|
|
};
|
|
|
|
|
2015-06-23 08:00:46 +00:00
|
|
|
RemoteVideo.createContainer = function (spanId) {
|
|
|
|
var container = document.createElement('span');
|
|
|
|
container.id = spanId;
|
|
|
|
container.className = 'videocontainer';
|
|
|
|
var remotes = document.getElementById('remoteVideos');
|
|
|
|
return remotes.appendChild(container);
|
|
|
|
};
|
|
|
|
|
2015-06-29 14:24:21 +00:00
|
|
|
|
2015-12-14 12:26:50 +00:00
|
|
|
export default RemoteVideo;
|