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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  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._supportsRemoteControl = false;
  38. this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP
  39. ? 'left bottom' : 'top center';
  40. this.addRemoteVideoContainer();
  41. this.updateIndicators();
  42. this.setDisplayName();
  43. this.bindHoverHandler();
  44. this.flipX = false;
  45. this.isLocal = false;
  46. this.popupMenuIsHovered = false;
  47. this._isRemoteControlSessionActive = false;
  48. /**
  49. * The flag is set to <tt>true</tt> after the 'onplay' event has been
  50. * triggered on the current video element. It goes back to <tt>false</tt>
  51. * when the stream is removed. It is used to determine whether the video
  52. * playback has ever started.
  53. * @type {boolean}
  54. */
  55. this.wasVideoPlayed = false;
  56. /**
  57. * The flag is set to <tt>true</tt> if remote participant's video gets muted
  58. * during his media connection disruption. This is to prevent black video
  59. * being render on the thumbnail, because even though once the video has
  60. * been played the image usually remains on the video element it seems that
  61. * after longer period of the video element being hidden this image can be
  62. * lost.
  63. * @type {boolean}
  64. */
  65. this.mutedWhileDisconnected = false;
  66. // Bind event handlers so they are only bound once for every instance.
  67. // TODO The event handlers should be turned into actions so changes can be
  68. // handled through reducers and middleware.
  69. this._requestRemoteControlPermissions
  70. = this._requestRemoteControlPermissions.bind(this);
  71. this._setAudioVolume = this._setAudioVolume.bind(this);
  72. this._stopRemoteControl = this._stopRemoteControl.bind(this);
  73. this.container.onclick = this._onContainerClick.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.updateRemoteVideoMenu();
  82. this.VideoLayout.resizeThumbnails(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(isMuted) {
  260. if (typeof isMuted !== 'undefined') {
  261. this.isAudioMuted = isMuted;
  262. }
  263. this._generatePopupContent();
  264. };
  265. /**
  266. * @inheritDoc
  267. * @override
  268. */
  269. RemoteVideo.prototype.setVideoMutedView = function(isMuted) {
  270. SmallVideo.prototype.setVideoMutedView.call(this, isMuted);
  271. // Update 'mutedWhileDisconnected' flag
  272. this._figureOutMutedWhileDisconnected();
  273. };
  274. /**
  275. * Figures out the value of {@link #mutedWhileDisconnected} flag by taking into
  276. * account remote participant's network connectivity and video muted status.
  277. *
  278. * @private
  279. */
  280. RemoteVideo.prototype._figureOutMutedWhileDisconnected = function() {
  281. const isActive = this.isConnectionActive();
  282. if (!isActive && this.isVideoMuted) {
  283. this.mutedWhileDisconnected = true;
  284. } else if (isActive && !this.isVideoMuted) {
  285. this.mutedWhileDisconnected = false;
  286. }
  287. };
  288. /**
  289. * Removes the remote stream element corresponding to the given stream and
  290. * parent container.
  291. *
  292. * @param stream the MediaStream
  293. * @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
  294. */
  295. RemoteVideo.prototype.removeRemoteStreamElement = function(stream) {
  296. if (!this.container) {
  297. return false;
  298. }
  299. const isVideo = stream.isVideoTrack();
  300. const elementID = SmallVideo.getStreamElementID(stream);
  301. const select = $(`#${elementID}`);
  302. select.remove();
  303. if (isVideo) {
  304. this.wasVideoPlayed = false;
  305. }
  306. logger.info(`${isVideo ? 'Video' : 'Audio'
  307. } removed ${this.id}`, select);
  308. // when removing only the video element and we are on stage
  309. // update the stage
  310. if (isVideo && this.isCurrentlyOnLargeVideo()) {
  311. this.VideoLayout.updateLargeVideo(this.id);
  312. } else {
  313. // Missing video stream will affect display mode
  314. this.updateView();
  315. }
  316. };
  317. /**
  318. * Checks whether the remote user associated with this <tt>RemoteVideo</tt>
  319. * has connectivity issues.
  320. *
  321. * @return {boolean} <tt>true</tt> if the user's connection is fine or
  322. * <tt>false</tt> otherwise.
  323. */
  324. RemoteVideo.prototype.isConnectionActive = function() {
  325. return this.user.getConnectionStatus()
  326. === JitsiParticipantConnectionStatus.ACTIVE;
  327. };
  328. /**
  329. * The remote video is considered "playable" once the stream has started
  330. * according to the {@link #hasVideoStarted} result.
  331. * It will be allowed to display video also in
  332. * {@link JitsiParticipantConnectionStatus.INTERRUPTED} if the video was ever
  333. * played and was not muted while not in ACTIVE state. This basically means
  334. * that there is stalled video image cached that could be displayed. It's used
  335. * to show "grey video image" in user's thumbnail when there are connectivity
  336. * issues.
  337. *
  338. * @inheritdoc
  339. * @override
  340. */
  341. RemoteVideo.prototype.isVideoPlayable = function() {
  342. const connectionState
  343. = APP.conference.getParticipantConnectionStatus(this.id);
  344. return SmallVideo.prototype.isVideoPlayable.call(this)
  345. && this.hasVideoStarted()
  346. && (connectionState === JitsiParticipantConnectionStatus.ACTIVE
  347. || (connectionState === JitsiParticipantConnectionStatus.INTERRUPTED
  348. && !this.mutedWhileDisconnected));
  349. };
  350. /**
  351. * @inheritDoc
  352. */
  353. RemoteVideo.prototype.updateView = function() {
  354. this.$container.toggleClass('audio-only', APP.conference.isAudioOnly());
  355. this.updateConnectionStatusIndicator();
  356. // This must be called after 'updateConnectionStatusIndicator' because it
  357. // affects the display mode by modifying 'mutedWhileDisconnected' flag
  358. SmallVideo.prototype.updateView.call(this);
  359. };
  360. /**
  361. * Updates the UI to reflect user's connectivity status.
  362. */
  363. RemoteVideo.prototype.updateConnectionStatusIndicator = function() {
  364. const connectionStatus = this.user.getConnectionStatus();
  365. logger.debug(`${this.id} thumbnail connection status: ${connectionStatus}`);
  366. // FIXME rename 'mutedWhileDisconnected' to 'mutedWhileNotRendering'
  367. // Update 'mutedWhileDisconnected' flag
  368. this._figureOutMutedWhileDisconnected();
  369. this.updateConnectionStatus(connectionStatus);
  370. const isInterrupted
  371. = connectionStatus === JitsiParticipantConnectionStatus.INTERRUPTED;
  372. // Toggle thumbnail video problem filter
  373. this.selectVideoElement().toggleClass(
  374. 'videoThumbnailProblemFilter', isInterrupted);
  375. this.$avatar().toggleClass(
  376. 'videoThumbnailProblemFilter', isInterrupted);
  377. };
  378. /**
  379. * Removes RemoteVideo from the page.
  380. */
  381. RemoteVideo.prototype.remove = function() {
  382. logger.log('Remove thumbnail', this.id);
  383. this.removeAudioLevelIndicator();
  384. const toolbarContainer
  385. = this.container.querySelector('.videocontainer__toolbar');
  386. if (toolbarContainer) {
  387. ReactDOM.unmountComponentAtNode(toolbarContainer);
  388. }
  389. this.removeConnectionIndicator();
  390. this.removeDisplayName();
  391. this.removeAvatar();
  392. this.removePresenceLabel();
  393. this._unmountIndicators();
  394. this.removeRemoteVideoMenu();
  395. // Make sure that the large video is updated if are removing its
  396. // corresponding small video.
  397. this.VideoLayout.updateAfterThumbRemoved(this.id);
  398. // Remove whole container
  399. if (this.container.parentNode) {
  400. this.container.parentNode.removeChild(this.container);
  401. }
  402. };
  403. RemoteVideo.prototype.waitForPlayback = function(streamElement, stream) {
  404. const webRtcStream = stream.getOriginalStream();
  405. const isVideo = stream.isVideoTrack();
  406. if (!isVideo || webRtcStream.id === 'mixedmslabel') {
  407. return;
  408. }
  409. const self = this;
  410. // Triggers when video playback starts
  411. const onPlayingHandler = function() {
  412. self.wasVideoPlayed = true;
  413. self.VideoLayout.remoteVideoActive(streamElement, self.id);
  414. streamElement.onplaying = null;
  415. // Refresh to show the video
  416. self.updateView();
  417. };
  418. streamElement.onplaying = onPlayingHandler;
  419. };
  420. /**
  421. * Checks whether the video stream has started for this RemoteVideo instance.
  422. *
  423. * @returns {boolean} true if this RemoteVideo has a video stream for which
  424. * the playback has been started.
  425. */
  426. RemoteVideo.prototype.hasVideoStarted = function() {
  427. return this.wasVideoPlayed;
  428. };
  429. RemoteVideo.prototype.addRemoteStreamElement = function(stream) {
  430. if (!this.container) {
  431. return;
  432. }
  433. const isVideo = stream.isVideoTrack();
  434. isVideo ? this.videoStream = stream : this.audioStream = stream;
  435. if (isVideo) {
  436. this.setVideoType(stream.videoType);
  437. }
  438. if (!stream.getOriginalStream()) {
  439. return;
  440. }
  441. let streamElement = SmallVideo.createStreamElement(stream);
  442. // Put new stream element always in front
  443. UIUtils.prependChild(this.container, streamElement);
  444. // If we hide element when Temasys plugin is used then
  445. // we'll never receive 'onplay' event and other logic won't work as expected
  446. // NOTE: hiding will not have effect when Temasys plugin is in use, as
  447. // calling attach will show it back
  448. $(streamElement).hide();
  449. // If the container is currently visible
  450. // we attach the stream to the element.
  451. if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
  452. this.waitForPlayback(streamElement, stream);
  453. streamElement = stream.attach(streamElement);
  454. }
  455. if (!isVideo) {
  456. this._audioStreamElement = streamElement;
  457. // If the remote video menu was created before the audio stream was
  458. // attached we need to update the menu in order to show the volume
  459. // slider.
  460. this.updateRemoteVideoMenu();
  461. }
  462. };
  463. /**
  464. * Sets the display name for the given video span id.
  465. *
  466. * @param displayName the display name to set
  467. */
  468. RemoteVideo.prototype.setDisplayName = function(displayName) {
  469. if (!this.container) {
  470. logger.warn(`Unable to set displayName - ${this.videoSpanId
  471. } does not exist`);
  472. return;
  473. }
  474. this.updateDisplayName({
  475. displayName: displayName || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME,
  476. elementID: `${this.videoSpanId}_name`,
  477. participantID: this.id
  478. });
  479. };
  480. /**
  481. * Removes remote video menu element from video element identified by
  482. * given <tt>videoElementId</tt>.
  483. *
  484. * @param videoElementId the id of local or remote video element.
  485. */
  486. RemoteVideo.prototype.removeRemoteVideoMenu = function() {
  487. const menuSpan = this.$container.find('.remotevideomenu');
  488. if (menuSpan.length) {
  489. ReactDOM.unmountComponentAtNode(menuSpan.get(0));
  490. menuSpan.remove();
  491. }
  492. };
  493. /**
  494. * Mounts the {@code PresenceLabel} for displaying the participant's current
  495. * presence status.
  496. *
  497. * @return {void}
  498. */
  499. RemoteVideo.prototype.addPresenceLabel = function() {
  500. const presenceLabelContainer
  501. = this.container.querySelector('.presence-label-container');
  502. if (presenceLabelContainer) {
  503. ReactDOM.render(
  504. <Provider store = { APP.store }>
  505. <I18nextProvider i18n = { i18next }>
  506. <PresenceLabel participantID = { this.id } />
  507. </I18nextProvider>
  508. </Provider>,
  509. presenceLabelContainer);
  510. }
  511. };
  512. /**
  513. * Unmounts the {@code PresenceLabel} component.
  514. *
  515. * @return {void}
  516. */
  517. RemoteVideo.prototype.removePresenceLabel = function() {
  518. const presenceLabelContainer
  519. = this.container.querySelector('.presence-label-container');
  520. if (presenceLabelContainer) {
  521. ReactDOM.unmountComponentAtNode(presenceLabelContainer);
  522. }
  523. };
  524. /**
  525. * Callback invoked when the thumbnail is clicked. Will directly call
  526. * VideoLayout to handle thumbnail click if certain elements have not been
  527. * clicked.
  528. *
  529. * @param {MouseEvent} event - The click event to intercept.
  530. * @private
  531. * @returns {void}
  532. */
  533. RemoteVideo.prototype._onContainerClick = function(event) {
  534. const $source = $(event.target || event.srcElement);
  535. const { classList } = event.target;
  536. const ignoreClick = $source.parents('.popover').length > 0
  537. || classList.contains('popover');
  538. if (!ignoreClick) {
  539. this.VideoLayout.handleVideoThumbClicked(this.id);
  540. }
  541. // On IE we need to populate this handler on video <object> and it does not
  542. // give event instance as an argument, so we check here for methods.
  543. if (event.stopPropagation && event.preventDefault && !ignoreClick) {
  544. event.stopPropagation();
  545. event.preventDefault();
  546. }
  547. return false;
  548. };
  549. RemoteVideo.createContainer = function(spanId) {
  550. const container = document.createElement('span');
  551. container.id = spanId;
  552. container.className = 'videocontainer';
  553. container.innerHTML = `
  554. <div class = 'videocontainer__background'></div>
  555. <div class = 'videocontainer__toptoolbar'></div>
  556. <div class = 'videocontainer__toolbar'></div>
  557. <div class = 'videocontainer__hoverOverlay'></div>
  558. <div class = 'displayNameContainer'></div>
  559. <div class = 'avatar-container'></div>
  560. <div class ='presence-label-container'></div>
  561. <span class = 'remotevideomenu'></span>`;
  562. const remotes = document.getElementById('filmstripRemoteVideosContainer');
  563. return remotes.appendChild(container);
  564. };
  565. export default RemoteVideo;