Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

RemoteVideo.js 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. /* global $, APP, interfaceConfig, JitsiMeetJS */
  2. /* eslint-disable no-unused-vars */
  3. import React from 'react';
  4. import ReactDOM from 'react-dom';
  5. import { Provider } from 'react-redux';
  6. import { I18nextProvider } from 'react-i18next';
  7. import { i18next } from '../../../react/features/base/i18n';
  8. import { PresenceLabel } from '../../../react/features/presence-status';
  9. import {
  10. REMOTE_CONTROL_MENU_STATES,
  11. RemoteVideoMenuTriggerButton
  12. } from '../../../react/features/remote-video-menu';
  13. /* eslint-enable no-unused-vars */
  14. const logger = require("jitsi-meet-logger").getLogger(__filename);
  15. import SmallVideo from "./SmallVideo";
  16. import UIUtils from "../util/UIUtil";
  17. const ParticipantConnectionStatus
  18. = JitsiMeetJS.constants.participantConnectionStatus;
  19. /**
  20. * Creates new instance of the <tt>RemoteVideo</tt>.
  21. * @param user {JitsiParticipant} the user for whom remote video instance will
  22. * be created.
  23. * @param {VideoLayout} VideoLayout the video layout instance.
  24. * @param {EventEmitter} emitter the event emitter which will be used by
  25. * the new instance to emit events.
  26. * @constructor
  27. */
  28. function RemoteVideo(user, VideoLayout, emitter) {
  29. this.user = user;
  30. this.id = user.getId();
  31. this.emitter = emitter;
  32. this.videoSpanId = `participant_${this.id}`;
  33. SmallVideo.call(this, VideoLayout);
  34. this._audioStreamElement = null;
  35. this.hasRemoteVideoMenu = false;
  36. this._supportsRemoteControl = false;
  37. this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP
  38. ? 'left top' : 'top center';
  39. this.addRemoteVideoContainer();
  40. this.updateIndicators();
  41. this.setDisplayName();
  42. this.bindHoverHandler();
  43. this.flipX = false;
  44. this.isLocal = false;
  45. this.popupMenuIsHovered = false;
  46. /**
  47. * The flag is set to <tt>true</tt> after the 'onplay' event has been
  48. * triggered on the current video element. It goes back to <tt>false</tt>
  49. * when the stream is removed. It is used to determine whether the video
  50. * playback has ever started.
  51. * @type {boolean}
  52. */
  53. this.wasVideoPlayed = false;
  54. /**
  55. * The flag is set to <tt>true</tt> if remote participant's video gets muted
  56. * during his media connection disruption. This is to prevent black video
  57. * being render on the thumbnail, because even though once the video has
  58. * been played the image usually remains on the video element it seems that
  59. * after longer period of the video element being hidden this image can be
  60. * lost.
  61. * @type {boolean}
  62. */
  63. this.mutedWhileDisconnected = false;
  64. // Bind event handlers so they are only bound once for every instance.
  65. // TODO The event handlers should be turned into actions so changes can be
  66. // handled through reducers and middleware.
  67. this._requestRemoteControlPermissions
  68. = this._requestRemoteControlPermissions.bind(this);
  69. this._setAudioVolume = this._setAudioVolume.bind(this);
  70. this._stopRemoteControl = this._stopRemoteControl.bind(this);
  71. }
  72. RemoteVideo.prototype = Object.create(SmallVideo.prototype);
  73. RemoteVideo.prototype.constructor = RemoteVideo;
  74. RemoteVideo.prototype.addRemoteVideoContainer = function() {
  75. this.container = RemoteVideo.createContainer(this.videoSpanId);
  76. this.initBrowserSpecificProperties();
  77. if (APP.conference.isModerator || this._supportsRemoteControl) {
  78. this.addRemoteVideoMenu();
  79. }
  80. this.VideoLayout.resizeThumbnails(false, true);
  81. this.addAudioLevelIndicator();
  82. this.addPresenceLabel();
  83. return this.container;
  84. };
  85. /**
  86. * Checks whether current video is considered hovered. Currently it is hovered
  87. * if the mouse is over the video, or if the connection indicator or the popup
  88. * menu is shown(hovered).
  89. * @private
  90. * NOTE: extends SmallVideo's method
  91. */
  92. RemoteVideo.prototype._isHovered = function () {
  93. let isHovered = SmallVideo.prototype._isHovered.call(this)
  94. || this.popupMenuIsHovered;
  95. return isHovered;
  96. };
  97. /**
  98. * Generates the popup menu content.
  99. *
  100. * @returns {Element|*} the constructed element, containing popup menu items
  101. * @private
  102. */
  103. RemoteVideo.prototype._generatePopupContent = function () {
  104. if (interfaceConfig.filmStripOnly) {
  105. return;
  106. }
  107. const remoteVideoMenuContainer
  108. = this.container.querySelector('.remotevideomenu');
  109. if (!remoteVideoMenuContainer) {
  110. return;
  111. }
  112. const { controller } = APP.remoteControl;
  113. let remoteControlState = null;
  114. let onRemoteControlToggle;
  115. if (this._supportsRemoteControl) {
  116. if (controller.getRequestedParticipant() === this.id) {
  117. onRemoteControlToggle = () => {};
  118. remoteControlState = REMOTE_CONTROL_MENU_STATES.REQUESTING;
  119. } else if (!controller.isStarted()) {
  120. onRemoteControlToggle = this._requestRemoteControlPermissions;
  121. remoteControlState = REMOTE_CONTROL_MENU_STATES.NOT_STARTED;
  122. } else {
  123. onRemoteControlToggle = this._stopRemoteControl;
  124. remoteControlState = REMOTE_CONTROL_MENU_STATES.STARTED;
  125. }
  126. }
  127. let initialVolumeValue, onVolumeChange;
  128. // Feature check for volume setting as temasys objects cannot adjust volume.
  129. if (this._canSetAudioVolume()) {
  130. initialVolumeValue = this._getAudioElement().volume;
  131. onVolumeChange = this._setAudioVolume;
  132. }
  133. const { isModerator } = APP.conference;
  134. const participantID = this.id;
  135. /* jshint ignore:start */
  136. ReactDOM.render(
  137. <Provider store = { APP.store }>
  138. <I18nextProvider i18n = { i18next }>
  139. <RemoteVideoMenuTriggerButton
  140. initialVolumeValue = { initialVolumeValue }
  141. isAudioMuted = { this.isAudioMuted }
  142. isModerator = { isModerator }
  143. onMenuDisplay = { this._onRemoteVideoMenuDisplay.bind(this) }
  144. onRemoteControlToggle = { onRemoteControlToggle }
  145. onVolumeChange = { onVolumeChange }
  146. participantID = { participantID }
  147. remoteControlState = { remoteControlState } />
  148. </I18nextProvider>
  149. </Provider>,
  150. remoteVideoMenuContainer);
  151. /* jshint ignore:end */
  152. };
  153. RemoteVideo.prototype._onRemoteVideoMenuDisplay = function () {
  154. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  155. };
  156. /**
  157. * Sets the remote control supported value and initializes or updates the menu
  158. * depending on the remote control is supported or not.
  159. * @param {boolean} isSupported
  160. */
  161. RemoteVideo.prototype.setRemoteControlSupport = function(isSupported = false) {
  162. if(this._supportsRemoteControl === isSupported) {
  163. return;
  164. }
  165. this._supportsRemoteControl = isSupported;
  166. if(!isSupported) {
  167. return;
  168. }
  169. if(!this.hasRemoteVideoMenu) {
  170. //create menu
  171. this.addRemoteVideoMenu();
  172. } else {
  173. //update the content
  174. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  175. }
  176. };
  177. /**
  178. * Requests permissions for remote control session.
  179. */
  180. RemoteVideo.prototype._requestRemoteControlPermissions = function () {
  181. APP.remoteControl.controller.requestPermissions(
  182. this.id, this.VideoLayout.getLargeVideoWrapper()).then(result => {
  183. if(result === null) {
  184. return;
  185. }
  186. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  187. APP.UI.messageHandler.notify(
  188. "dialog.remoteControlTitle",
  189. (result === false) ? "dialog.remoteControlDeniedMessage"
  190. : "dialog.remoteControlAllowedMessage",
  191. {user: this.user.getDisplayName()
  192. || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME}
  193. );
  194. if(result === true) {//the remote control permissions has been granted
  195. // pin the controlled participant
  196. let pinnedId = this.VideoLayout.getPinnedId();
  197. if(pinnedId !== this.id) {
  198. this.VideoLayout.handleVideoThumbClicked(this.id);
  199. }
  200. }
  201. }, error => {
  202. logger.error(error);
  203. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  204. APP.UI.messageHandler.notify(
  205. "dialog.remoteControlTitle",
  206. "dialog.remoteControlErrorMessage",
  207. {user: this.user.getDisplayName()
  208. || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME}
  209. );
  210. });
  211. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  212. };
  213. /**
  214. * Stops remote control session.
  215. */
  216. RemoteVideo.prototype._stopRemoteControl = function () {
  217. // send message about stopping
  218. APP.remoteControl.controller.stop();
  219. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  220. };
  221. /**
  222. * Get the remote participant's audio element.
  223. *
  224. * @returns {Element} audio element
  225. */
  226. RemoteVideo.prototype._getAudioElement = function () {
  227. return this._audioStreamElement;
  228. };
  229. /**
  230. * Check if the remote participant's audio can have its volume adjusted.
  231. *
  232. * @returns {boolean} true if the volume can be adjusted.
  233. */
  234. RemoteVideo.prototype._canSetAudioVolume = function () {
  235. const audioElement = this._getAudioElement();
  236. return audioElement && audioElement.volume !== undefined;
  237. };
  238. /**
  239. * Change the remote participant's volume level.
  240. *
  241. * @param {int} newVal - The value to set the slider to.
  242. */
  243. RemoteVideo.prototype._setAudioVolume = function (newVal) {
  244. if (this._canSetAudioVolume()) {
  245. this._getAudioElement().volume = newVal;
  246. }
  247. };
  248. /**
  249. * Updates the remote video menu.
  250. *
  251. * @param isMuted the new muted state to update to
  252. * @param force to work even if popover is not visible
  253. */
  254. RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted) {
  255. this.isAudioMuted = isMuted;
  256. this._generatePopupContent();
  257. };
  258. /**
  259. * @inheritDoc
  260. * @override
  261. */
  262. RemoteVideo.prototype.setVideoMutedView = function(isMuted) {
  263. SmallVideo.prototype.setVideoMutedView.call(this, isMuted);
  264. // Update 'mutedWhileDisconnected' flag
  265. this._figureOutMutedWhileDisconnected();
  266. };
  267. /**
  268. * Figures out the value of {@link #mutedWhileDisconnected} flag by taking into
  269. * account remote participant's network connectivity and video muted status.
  270. *
  271. * @private
  272. */
  273. RemoteVideo.prototype._figureOutMutedWhileDisconnected = function() {
  274. const isActive = this.isConnectionActive();
  275. if (!isActive && this.isVideoMuted) {
  276. this.mutedWhileDisconnected = true;
  277. } else if (isActive && !this.isVideoMuted) {
  278. this.mutedWhileDisconnected = false;
  279. }
  280. };
  281. /**
  282. * Adds the remote video menu element for the given <tt>id</tt> in the
  283. * given <tt>parentElement</tt>.
  284. *
  285. * @param id the id indicating the video for which we're adding a menu.
  286. * @param parentElement the parent element where this menu will be added
  287. */
  288. RemoteVideo.prototype.addRemoteVideoMenu = function () {
  289. if (interfaceConfig.filmStripOnly) {
  290. return;
  291. }
  292. this._generatePopupContent();
  293. this.hasRemoteVideoMenu = true;
  294. };
  295. /**
  296. * Removes the remote stream element corresponding to the given stream and
  297. * parent container.
  298. *
  299. * @param stream the MediaStream
  300. * @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
  301. */
  302. RemoteVideo.prototype.removeRemoteStreamElement = function (stream) {
  303. if (!this.container)
  304. return false;
  305. var isVideo = stream.isVideoTrack();
  306. var elementID = SmallVideo.getStreamElementID(stream);
  307. var select = $('#' + elementID);
  308. select.remove();
  309. if (isVideo) {
  310. this.wasVideoPlayed = false;
  311. }
  312. logger.info((isVideo ? "Video" : "Audio") +
  313. " removed " + this.id, select);
  314. // when removing only the video element and we are on stage
  315. // update the stage
  316. if (isVideo && this.isCurrentlyOnLargeVideo()) {
  317. this.VideoLayout.updateLargeVideo(this.id);
  318. } else {
  319. // Missing video stream will affect display mode
  320. this.updateView();
  321. }
  322. };
  323. /**
  324. * Checks whether the remote user associated with this <tt>RemoteVideo</tt>
  325. * has connectivity issues.
  326. *
  327. * @return {boolean} <tt>true</tt> if the user's connection is fine or
  328. * <tt>false</tt> otherwise.
  329. */
  330. RemoteVideo.prototype.isConnectionActive = function() {
  331. return this.user.getConnectionStatus()
  332. === ParticipantConnectionStatus.ACTIVE;
  333. };
  334. /**
  335. * The remote video is considered "playable" once the stream has started
  336. * according to the {@link #hasVideoStarted} result.
  337. * It will be allowed to display video also in
  338. * {@link ParticipantConnectionStatus.INTERRUPTED} if the video was ever played
  339. * and was not muted while not in ACTIVE state. This basically means that there
  340. * is stalled video image cached that could be displayed. It's used to show
  341. * "grey video image" in user's thumbnail when there are connectivity issues.
  342. *
  343. * @inheritdoc
  344. * @override
  345. */
  346. RemoteVideo.prototype.isVideoPlayable = function () {
  347. const connectionState
  348. = APP.conference.getParticipantConnectionStatus(this.id);
  349. return SmallVideo.prototype.isVideoPlayable.call(this)
  350. && this.hasVideoStarted()
  351. && (connectionState === ParticipantConnectionStatus.ACTIVE
  352. || (connectionState === ParticipantConnectionStatus.INTERRUPTED
  353. && !this.mutedWhileDisconnected));
  354. };
  355. /**
  356. * @inheritDoc
  357. */
  358. RemoteVideo.prototype.updateView = function () {
  359. $(this.container).toggleClass('audio-only', APP.conference.isAudioOnly());
  360. this.updateConnectionStatusIndicator();
  361. // This must be called after 'updateConnectionStatusIndicator' because it
  362. // affects the display mode by modifying 'mutedWhileDisconnected' flag
  363. SmallVideo.prototype.updateView.call(this);
  364. };
  365. /**
  366. * Updates the UI to reflect user's connectivity status.
  367. */
  368. RemoteVideo.prototype.updateConnectionStatusIndicator = function () {
  369. const connectionStatus = this.user.getConnectionStatus();
  370. logger.debug(`${this.id} thumbnail connection status: ${connectionStatus}`);
  371. // FIXME rename 'mutedWhileDisconnected' to 'mutedWhileNotRendering'
  372. // Update 'mutedWhileDisconnected' flag
  373. this._figureOutMutedWhileDisconnected();
  374. this.updateConnectionStatus(connectionStatus);
  375. const isInterrupted
  376. = connectionStatus === ParticipantConnectionStatus.INTERRUPTED;
  377. // Toggle thumbnail video problem filter
  378. this.selectVideoElement().toggleClass(
  379. "videoThumbnailProblemFilter", isInterrupted);
  380. this.$avatar().toggleClass(
  381. "videoThumbnailProblemFilter", isInterrupted);
  382. };
  383. /**
  384. * Removes RemoteVideo from the page.
  385. */
  386. RemoteVideo.prototype.remove = function () {
  387. logger.log("Remove thumbnail", this.id);
  388. this.removeAudioLevelIndicator();
  389. const toolbarContainer
  390. = this.container.querySelector('.videocontainer__toolbar');
  391. if (toolbarContainer) {
  392. ReactDOM.unmountComponentAtNode(toolbarContainer);
  393. }
  394. this.removeConnectionIndicator();
  395. this.removeDisplayName();
  396. this.removeAvatar();
  397. this.removePresenceLabel();
  398. this._unmountIndicators();
  399. this.removeRemoteVideoMenu();
  400. // Make sure that the large video is updated if are removing its
  401. // corresponding small video.
  402. this.VideoLayout.updateAfterThumbRemoved(this.id);
  403. // Remove whole container
  404. if (this.container.parentNode) {
  405. this.container.parentNode.removeChild(this.container);
  406. }
  407. };
  408. RemoteVideo.prototype.waitForPlayback = function (streamElement, stream) {
  409. var webRtcStream = stream.getOriginalStream();
  410. var isVideo = stream.isVideoTrack();
  411. if (!isVideo || webRtcStream.id === 'mixedmslabel') {
  412. return;
  413. }
  414. var self = this;
  415. // Triggers when video playback starts
  416. var onPlayingHandler = function () {
  417. self.wasVideoPlayed = true;
  418. self.VideoLayout.remoteVideoActive(streamElement, self.id);
  419. streamElement.onplaying = null;
  420. // Refresh to show the video
  421. self.updateView();
  422. };
  423. streamElement.onplaying = onPlayingHandler;
  424. };
  425. /**
  426. * Checks whether the video stream has started for this RemoteVideo instance.
  427. *
  428. * @returns {boolean} true if this RemoteVideo has a video stream for which
  429. * the playback has been started.
  430. */
  431. RemoteVideo.prototype.hasVideoStarted = function () {
  432. return this.wasVideoPlayed;
  433. };
  434. RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
  435. if (!this.container) {
  436. return;
  437. }
  438. let isVideo = stream.isVideoTrack();
  439. isVideo ? this.videoStream = stream : this.audioStream = stream;
  440. if (isVideo)
  441. this.setVideoType(stream.videoType);
  442. // Add click handler.
  443. let onClickHandler = (event) => {
  444. const $source = $(event.target || event.srcElement);
  445. const { classList } = event.target;
  446. const clickedOnPopover
  447. = $source.parents('.connection-info').length > 0;
  448. const clickedOnPopoverTrigger
  449. = $source.parents('.popover-trigger').length > 0
  450. || classList.contains('popover-trigger');
  451. const clickedOnRemoteMenu
  452. = $source.parents('.remotevideomenu').length > 0;
  453. const ignoreClick = clickedOnPopoverTrigger
  454. || clickedOnPopover
  455. || clickedOnRemoteMenu;
  456. if (!ignoreClick) {
  457. this.VideoLayout.handleVideoThumbClicked(this.id);
  458. }
  459. // On IE we need to populate this handler on video <object>
  460. // and it does not give event instance as an argument,
  461. // so we check here for methods.
  462. if (event.stopPropagation && event.preventDefault && !ignoreClick) {
  463. event.stopPropagation();
  464. event.preventDefault();
  465. }
  466. return false;
  467. };
  468. this.container.onclick = onClickHandler;
  469. if(!stream.getOriginalStream())
  470. return;
  471. let streamElement = SmallVideo.createStreamElement(stream);
  472. // Put new stream element always in front
  473. UIUtils.prependChild(this.container, streamElement);
  474. // If we hide element when Temasys plugin is used then
  475. // we'll never receive 'onplay' event and other logic won't work as expected
  476. // NOTE: hiding will not have effect when Temasys plugin is in use, as
  477. // calling attach will show it back
  478. $(streamElement).hide();
  479. // If the container is currently visible
  480. // we attach the stream to the element.
  481. if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
  482. this.waitForPlayback(streamElement, stream);
  483. streamElement = stream.attach(streamElement);
  484. }
  485. $(streamElement).click(onClickHandler);
  486. if (!isVideo) {
  487. this._audioStreamElement = streamElement;
  488. }
  489. };
  490. /**
  491. * Sets the display name for the given video span id.
  492. *
  493. * @param displayName the display name to set
  494. */
  495. RemoteVideo.prototype.setDisplayName = function(displayName) {
  496. if (!this.container) {
  497. logger.warn( "Unable to set displayName - " + this.videoSpanId +
  498. " does not exist");
  499. return;
  500. }
  501. this.updateDisplayName({
  502. displayName: displayName || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME,
  503. elementID: `${this.videoSpanId}_name`,
  504. participantID: this.id
  505. });
  506. };
  507. /**
  508. * Removes remote video menu element from video element identified by
  509. * given <tt>videoElementId</tt>.
  510. *
  511. * @param videoElementId the id of local or remote video element.
  512. */
  513. RemoteVideo.prototype.removeRemoteVideoMenu = function() {
  514. var menuSpan = $('#' + this.videoSpanId + '> .remotevideomenu');
  515. if (menuSpan.length) {
  516. ReactDOM.unmountComponentAtNode(menuSpan.get(0));
  517. menuSpan.remove();
  518. this.hasRemoteVideoMenu = false;
  519. }
  520. };
  521. /**
  522. * Mounts the {@code PresenceLabel} for displaying the participant's current
  523. * presence status.
  524. *
  525. * @return {void}
  526. */
  527. RemoteVideo.prototype.addPresenceLabel = function () {
  528. const presenceLabelContainer
  529. = this.container.querySelector('.presence-label-container');
  530. if (presenceLabelContainer) {
  531. /* jshint ignore:start */
  532. ReactDOM.render(
  533. <Provider store = { APP.store }>
  534. <PresenceLabel participantID = { this.id } />
  535. </Provider>,
  536. presenceLabelContainer);
  537. /* jshint ignore:end */
  538. }
  539. };
  540. /**
  541. * Unmounts the {@code PresenceLabel} component.
  542. *
  543. * @return {void}
  544. */
  545. RemoteVideo.prototype.removePresenceLabel = function () {
  546. const presenceLabelContainer
  547. = this.container.querySelector('.presence-label-container');
  548. if (presenceLabelContainer) {
  549. ReactDOM.unmountComponentAtNode(presenceLabelContainer);
  550. }
  551. };
  552. RemoteVideo.createContainer = function (spanId) {
  553. let container = document.createElement('span');
  554. container.id = spanId;
  555. container.className = 'videocontainer';
  556. let wrapper = document.createElement('div');
  557. wrapper.className = 'videocontainer__background';
  558. container.appendChild(wrapper);
  559. let indicatorBar = document.createElement('div');
  560. indicatorBar.className = "videocontainer__toptoolbar";
  561. container.appendChild(indicatorBar);
  562. let toolbar = document.createElement('div');
  563. toolbar.className = "videocontainer__toolbar";
  564. container.appendChild(toolbar);
  565. let overlay = document.createElement('div');
  566. overlay.className = "videocontainer__hoverOverlay";
  567. container.appendChild(overlay);
  568. const displayNameContainer = document.createElement('div');
  569. displayNameContainer.className = 'displayNameContainer';
  570. container.appendChild(displayNameContainer);
  571. const avatarContainer = document.createElement('div');
  572. avatarContainer.className = 'avatar-container';
  573. container.appendChild(avatarContainer);
  574. const presenceLabelContainer = document.createElement('div');
  575. presenceLabelContainer.className = 'presence-label-container';
  576. container.appendChild(presenceLabelContainer);
  577. const remoteVideoMenuContainer = document.createElement('span');
  578. remoteVideoMenuContainer.className = 'remotevideomenu';
  579. container.appendChild(remoteVideoMenuContainer);
  580. var remotes = document.getElementById('filmstripRemoteVideosContainer');
  581. return remotes.appendChild(container);
  582. };
  583. export default RemoteVideo;