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

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