You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RemoteVideo.js 21KB

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