您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

RemoteVideo.js 22KB

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