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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. /* global $, APP, interfaceConfig */
  2. const logger = require("jitsi-meet-logger").getLogger(__filename);
  3. import ConnectionIndicator from './ConnectionIndicator';
  4. import SmallVideo from "./SmallVideo";
  5. import UIUtils from "../util/UIUtil";
  6. import UIEvents from '../../../service/UI/UIEvents';
  7. import JitsiPopover from "../util/JitsiPopover";
  8. const MUTED_DIALOG_BUTTON_VALUES = {
  9. cancel: 0,
  10. muted: 1
  11. };
  12. /**
  13. * Creates new instance of the <tt>RemoteVideo</tt>.
  14. * @param user {JitsiParticipant} the user for whom remote video instance will
  15. * be created.
  16. * @param {VideoLayout} VideoLayout the video layout instance.
  17. * @param {EventEmitter} emitter the event emitter which will be used by
  18. * the new instance to emit events.
  19. * @constructor
  20. */
  21. function RemoteVideo(user, VideoLayout, emitter) {
  22. this.user = user;
  23. this.id = user.getId();
  24. this.emitter = emitter;
  25. this.videoSpanId = `participant_${this.id}`;
  26. SmallVideo.call(this, VideoLayout);
  27. this.hasRemoteVideoMenu = false;
  28. this.addRemoteVideoContainer();
  29. this.connectionIndicator = new ConnectionIndicator(this, this.id);
  30. this.setDisplayName();
  31. this.bindHoverHandler();
  32. this.flipX = false;
  33. this.isLocal = false;
  34. this.popupMenuIsHovered = false;
  35. /**
  36. * The flag is set to <tt>true</tt> after the 'onplay' event has been
  37. * triggered on the current video element. It goes back to <tt>false</tt>
  38. * when the stream is removed. It is used to determine whether the video
  39. * playback has ever started.
  40. * @type {boolean}
  41. */
  42. this.wasVideoPlayed = false;
  43. /**
  44. * The flag is set to <tt>true</tt> if remote participant's video gets muted
  45. * during his media connection disruption. This is to prevent black video
  46. * being render on the thumbnail, because even though once the video has
  47. * been played the image usually remains on the video element it seems that
  48. * after longer period of the video element being hidden this image can be
  49. * lost.
  50. * @type {boolean}
  51. */
  52. this.mutedWhileDisconnected = false;
  53. }
  54. RemoteVideo.prototype = Object.create(SmallVideo.prototype);
  55. RemoteVideo.prototype.constructor = RemoteVideo;
  56. RemoteVideo.prototype.addRemoteVideoContainer = function() {
  57. this.container = RemoteVideo.createContainer(this.videoSpanId);
  58. this.initBrowserSpecificProperties();
  59. if (APP.conference.isModerator) {
  60. this.addRemoteVideoMenu();
  61. }
  62. this.VideoLayout.resizeThumbnails(false, true);
  63. this.addAudioLevelIndicator();
  64. return this.container;
  65. };
  66. /**
  67. * Initializes the remote participant popup menu, by specifying previously
  68. * constructed popupMenuElement, containing all the menu items.
  69. *
  70. * @param popupMenuElement a pre-constructed element, containing the menu items
  71. * to display in the popup
  72. */
  73. RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) {
  74. let options = {
  75. content: popupMenuElement.outerHTML,
  76. skin: "black",
  77. hasArrow: false,
  78. onBeforePosition: el => APP.translation.translateElement(el)
  79. };
  80. let element = $("#" + this.videoSpanId + " .remotevideomenu");
  81. this.popover = new JitsiPopover(element, options);
  82. this.popover.addOnHoverPopover(isHovered => {
  83. this.popupMenuIsHovered = isHovered;
  84. this.updateView();
  85. });
  86. // override popover show method to make sure we will update the content
  87. // before showing the popover
  88. let origShowFunc = this.popover.show;
  89. this.popover.show = function () {
  90. // update content by forcing it, to finish even if popover
  91. // is not visible
  92. this.updateRemoteVideoMenu(this.isAudioMuted, true);
  93. // call the original show, passing its actual this
  94. origShowFunc.call(this.popover);
  95. }.bind(this);
  96. // override popover hide method so we can cleanup click handlers
  97. let origHideFunc = this.popover.forceHide;
  98. this.popover.forceHide = function () {
  99. $(document).off("click", '#mutelink_' + this.id);
  100. $(document).off("click", '#ejectlink_' + this.id);
  101. origHideFunc.call(this.popover);
  102. }.bind(this);
  103. };
  104. /**
  105. * Checks whether current video is considered hovered. Currently it is hovered
  106. * if the mouse is over the video, or if the connection indicator or the popup
  107. * menu is shown(hovered).
  108. * @private
  109. * NOTE: extends SmallVideo's method
  110. */
  111. RemoteVideo.prototype._isHovered = function () {
  112. let isHovered = SmallVideo.prototype._isHovered.call(this)
  113. || this.popupMenuIsHovered;
  114. return isHovered;
  115. };
  116. /**
  117. * Generates the popup menu content.
  118. *
  119. * @returns {Element|*} the constructed element, containing popup menu items
  120. * @private
  121. */
  122. RemoteVideo.prototype._generatePopupContent = function () {
  123. let popupmenuElement = document.createElement('ul');
  124. popupmenuElement.className = 'popupmenu';
  125. popupmenuElement.id = `remote_popupmenu_${this.id}`;
  126. let muteTranslationKey;
  127. let muteClassName;
  128. if (this.isAudioMuted) {
  129. muteTranslationKey = 'videothumbnail.muted';
  130. muteClassName = 'mutelink disabled';
  131. } else {
  132. muteTranslationKey = 'videothumbnail.domute';
  133. muteClassName = 'mutelink';
  134. }
  135. let muteHandler = this._muteHandler.bind(this);
  136. let kickHandler = this._kickHandler.bind(this);
  137. let menuItems = [
  138. {
  139. id: 'mutelink_' + this.id,
  140. handler: muteHandler,
  141. icon: 'icon-mic-disabled',
  142. className: muteClassName,
  143. data: {
  144. i18n: muteTranslationKey
  145. }
  146. }, {
  147. id: 'ejectlink_' + this.id,
  148. handler: kickHandler,
  149. icon: 'icon-kick',
  150. data: {
  151. i18n: 'videothumbnail.kick'
  152. }
  153. }
  154. ];
  155. menuItems.forEach(el => {
  156. let menuItem = this._generatePopupMenuItem(el);
  157. popupmenuElement.appendChild(menuItem);
  158. });
  159. APP.translation.translateElement($(popupmenuElement));
  160. return popupmenuElement;
  161. };
  162. RemoteVideo.prototype._muteHandler = function () {
  163. if (this.isAudioMuted)
  164. return;
  165. RemoteVideo.showMuteParticipantDialog().then(reason => {
  166. if(reason === MUTED_DIALOG_BUTTON_VALUES.muted) {
  167. this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id);
  168. }
  169. }).catch(e => {
  170. //currently shouldn't be called
  171. logger.error(e);
  172. });
  173. this.popover.forceHide();
  174. };
  175. RemoteVideo.prototype._kickHandler = function () {
  176. this.emitter.emit(UIEvents.USER_KICKED, this.id);
  177. this.popover.forceHide();
  178. };
  179. RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
  180. let {
  181. id,
  182. handler,
  183. icon,
  184. data,
  185. className
  186. } = opts;
  187. handler = handler || $.noop;
  188. let menuItem = document.createElement('li');
  189. menuItem.className = 'popupmenu__item';
  190. let linkItem = document.createElement('a');
  191. linkItem.className = 'popupmenu__link';
  192. if (className) {
  193. linkItem.className += ` ${className}`;
  194. }
  195. if (icon) {
  196. let indicator = document.createElement('span');
  197. indicator.className = 'popupmenu__icon';
  198. indicator.innerHTML = `<i class="${icon}"></i>`;
  199. linkItem.appendChild(indicator);
  200. }
  201. let textContent = document.createElement('span');
  202. textContent.className = 'popupmenu__text';
  203. if (data) {
  204. let dataKeys = Object.keys(data);
  205. dataKeys.forEach(key => {
  206. textContent.dataset[key] = data[key];
  207. });
  208. }
  209. linkItem.appendChild(textContent);
  210. linkItem.id = id;
  211. // Delegate event to the document.
  212. $(document).on("click", `#${id}`, handler);
  213. menuItem.appendChild(linkItem);
  214. return menuItem;
  215. };
  216. /**
  217. * Updates the remote video menu.
  218. *
  219. * @param isMuted the new muted state to update to
  220. * @param force to work even if popover is not visible
  221. */
  222. RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
  223. this.isAudioMuted = isMuted;
  224. // generate content, translate it and add it to document only if
  225. // popover is visible or we force to do so.
  226. if(this.popover.popoverShown || force) {
  227. this.popover.updateContent(this._generatePopupContent());
  228. }
  229. };
  230. /**
  231. * @inheritDoc
  232. */
  233. RemoteVideo.prototype.setMutedView = function(isMuted) {
  234. SmallVideo.prototype.setMutedView.call(this, isMuted);
  235. // Update 'mutedWhileDisconnected' flag
  236. this._figureOutMutedWhileDisconnected(this.isConnectionActive() === false);
  237. };
  238. /**
  239. * Figures out the value of {@link #mutedWhileDisconnected} flag by taking into
  240. * account remote participant's network connectivity and video muted status.
  241. *
  242. * @param {boolean} isDisconnected <tt>true</tt> if the remote participant is
  243. * currently having connectivity issues or <tt>false</tt> otherwise.
  244. *
  245. * @private
  246. */
  247. RemoteVideo.prototype._figureOutMutedWhileDisconnected
  248. = function(isDisconnected) {
  249. if (isDisconnected && this.isVideoMuted) {
  250. this.mutedWhileDisconnected = true;
  251. } else if (!isDisconnected && !this.isVideoMuted) {
  252. this.mutedWhileDisconnected = false;
  253. }
  254. };
  255. /**
  256. * Adds the remote video menu element for the given <tt>id</tt> in the
  257. * given <tt>parentElement</tt>.
  258. *
  259. * @param id the id indicating the video for which we're adding a menu.
  260. * @param parentElement the parent element where this menu will be added
  261. */
  262. if (!interfaceConfig.filmStripOnly) {
  263. RemoteVideo.prototype.addRemoteVideoMenu = function () {
  264. var spanElement = document.createElement('span');
  265. spanElement.className = 'remotevideomenu';
  266. this.container.appendChild(spanElement);
  267. var menuElement = document.createElement('i');
  268. menuElement.className = 'icon-menu-up';
  269. menuElement.title = 'Remote user controls';
  270. spanElement.appendChild(menuElement);
  271. this._initPopupMenu(this._generatePopupContent());
  272. this.hasRemoteVideoMenu = true;
  273. };
  274. } else {
  275. RemoteVideo.prototype.addRemoteVideoMenu = function() {};
  276. }
  277. /**
  278. * Removes the remote stream element corresponding to the given stream and
  279. * parent container.
  280. *
  281. * @param stream the MediaStream
  282. * @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
  283. */
  284. RemoteVideo.prototype.removeRemoteStreamElement = function (stream) {
  285. if (!this.container)
  286. return false;
  287. var isVideo = stream.isVideoTrack();
  288. var elementID = SmallVideo.getStreamElementID(stream);
  289. var select = $('#' + elementID);
  290. select.remove();
  291. if (isVideo) {
  292. this.wasVideoPlayed = false;
  293. }
  294. logger.info((isVideo ? "Video" : "Audio") +
  295. " removed " + this.id, select);
  296. // when removing only the video element and we are on stage
  297. // update the stage
  298. if (isVideo && this.isCurrentlyOnLargeVideo())
  299. this.VideoLayout.updateLargeVideo(this.id);
  300. else
  301. // Missing video stream will affect display mode
  302. this.updateView();
  303. };
  304. /**
  305. * Checks whether the remote user associated with this <tt>RemoteVideo</tt>
  306. * has connectivity issues.
  307. *
  308. * @return {boolean} <tt>true</tt> if the user's connection is fine or
  309. * <tt>false</tt> otherwise.
  310. */
  311. RemoteVideo.prototype.isConnectionActive = function() {
  312. return this.user.isConnectionActive();
  313. };
  314. /**
  315. * The remote video is considered "playable" once the stream has started
  316. * according to the {@link #hasVideoStarted} result.
  317. *
  318. * @inheritdoc
  319. * @override
  320. */
  321. RemoteVideo.prototype.isVideoPlayable = function () {
  322. return SmallVideo.prototype.isVideoPlayable.call(this)
  323. && this.hasVideoStarted() && !this.mutedWhileDisconnected;
  324. };
  325. /**
  326. * @inheritDoc
  327. */
  328. RemoteVideo.prototype.updateView = function () {
  329. this.updateConnectionStatusIndicator(
  330. null /* will obtain the status from 'conference' */);
  331. // This must be called after 'updateConnectionStatusIndicator' because it
  332. // affects the display mode by modifying 'mutedWhileDisconnected' flag
  333. SmallVideo.prototype.updateView.call(this);
  334. };
  335. /**
  336. * Updates the UI to reflect user's connectivity status.
  337. * @param isActive {boolean|null} 'true' if user's connection is active or
  338. * 'false' when the use is having some connectivity issues and a warning
  339. * should be displayed. When 'null' is passed then the current value will be
  340. * obtained from the conference instance.
  341. */
  342. RemoteVideo.prototype.updateConnectionStatusIndicator = function (isActive) {
  343. // Check for initial value if 'isActive' is not defined
  344. if (typeof isActive !== "boolean") {
  345. isActive = this.isConnectionActive();
  346. if (isActive === null) {
  347. // Cancel processing at this point - no update
  348. return;
  349. }
  350. }
  351. logger.debug(this.id + " thumbnail is connection active ? " + isActive);
  352. // Update 'mutedWhileDisconnected' flag
  353. this._figureOutMutedWhileDisconnected(!isActive);
  354. if(this.connectionIndicator)
  355. this.connectionIndicator.updateConnectionStatusIndicator(isActive);
  356. // Toggle thumbnail video problem filter
  357. this.selectVideoElement().toggleClass(
  358. "videoThumbnailProblemFilter", !isActive);
  359. this.$avatar().toggleClass(
  360. "videoThumbnailProblemFilter", !isActive);
  361. };
  362. /**
  363. * Removes RemoteVideo from the page.
  364. */
  365. RemoteVideo.prototype.remove = function () {
  366. logger.log("Remove thumbnail", this.id);
  367. this.removeConnectionIndicator();
  368. // Make sure that the large video is updated if are removing its
  369. // corresponding small video.
  370. this.VideoLayout.updateAfterThumbRemoved(this.id);
  371. // Remove whole container
  372. if (this.container.parentNode) {
  373. this.container.parentNode.removeChild(this.container);
  374. }
  375. };
  376. RemoteVideo.prototype.waitForPlayback = function (streamElement, stream) {
  377. var webRtcStream = stream.getOriginalStream();
  378. var isVideo = stream.isVideoTrack();
  379. if (!isVideo || webRtcStream.id === 'mixedmslabel') {
  380. return;
  381. }
  382. var self = this;
  383. // Triggers when video playback starts
  384. var onPlayingHandler = function () {
  385. self.wasVideoPlayed = true;
  386. self.VideoLayout.remoteVideoActive(streamElement, self.id);
  387. streamElement.onplaying = null;
  388. // Refresh to show the video
  389. self.updateView();
  390. };
  391. streamElement.onplaying = onPlayingHandler;
  392. };
  393. /**
  394. * Checks whether the video stream has started for this RemoteVideo instance.
  395. *
  396. * @returns {boolean} true if this RemoteVideo has a video stream for which
  397. * the playback has been started.
  398. */
  399. RemoteVideo.prototype.hasVideoStarted = function () {
  400. return this.wasVideoPlayed;
  401. };
  402. RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
  403. if (!this.container) {
  404. return;
  405. }
  406. let isVideo = stream.isVideoTrack();
  407. isVideo ? this.videoStream = stream : this.audioStream = stream;
  408. if (isVideo)
  409. this.setVideoType(stream.videoType);
  410. // Add click handler.
  411. let onClickHandler = (event) => {
  412. let source = event.target || event.srcElement;
  413. // ignore click if it was done in popup menu
  414. if ($(source).parents('.popupmenu').length === 0) {
  415. this.VideoLayout.handleVideoThumbClicked(this.id);
  416. }
  417. // On IE we need to populate this handler on video <object>
  418. // and it does not give event instance as an argument,
  419. // so we check here for methods.
  420. if (event.stopPropagation && event.preventDefault) {
  421. event.stopPropagation();
  422. event.preventDefault();
  423. }
  424. return false;
  425. };
  426. this.container.onclick = onClickHandler;
  427. if(!stream.getOriginalStream())
  428. return;
  429. let streamElement = SmallVideo.createStreamElement(stream);
  430. // Put new stream element always in front
  431. UIUtils.prependChild(this.container, streamElement);
  432. // If we hide element when Temasys plugin is used then
  433. // we'll never receive 'onplay' event and other logic won't work as expected
  434. // NOTE: hiding will not have effect when Temasys plugin is in use, as
  435. // calling attach will show it back
  436. $(streamElement).hide();
  437. // If the container is currently visible
  438. // we attach the stream to the element.
  439. if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
  440. this.waitForPlayback(streamElement, stream);
  441. streamElement = stream.attach(streamElement);
  442. }
  443. $(streamElement).click(onClickHandler);
  444. };
  445. /**
  446. * Show/hide peer container for the given id.
  447. */
  448. RemoteVideo.prototype.showPeerContainer = function (state) {
  449. if (!this.container)
  450. return;
  451. var isHide = state === 'hide';
  452. var resizeThumbnails = false;
  453. if (!isHide) {
  454. if (!$(this.container).is(':visible')) {
  455. resizeThumbnails = true;
  456. $(this.container).show();
  457. }
  458. // Call updateView, so that we'll figure out if avatar
  459. // should be displayed based on video muted status and whether or not
  460. // it's in the lastN set
  461. this.updateView();
  462. }
  463. else if ($(this.container).is(':visible') && isHide)
  464. {
  465. resizeThumbnails = true;
  466. $(this.container).hide();
  467. if(this.connectionIndicator)
  468. this.connectionIndicator.hide();
  469. }
  470. if (resizeThumbnails) {
  471. this.VideoLayout.resizeThumbnails();
  472. }
  473. // We want to be able to pin a participant from the contact list, even
  474. // if he's not in the lastN set!
  475. // ContactList.setClickable(id, !isHide);
  476. };
  477. RemoteVideo.prototype.updateResolution = function (resolution) {
  478. if (this.connectionIndicator) {
  479. this.connectionIndicator.updateResolution(resolution);
  480. }
  481. };
  482. RemoteVideo.prototype.removeConnectionIndicator = function () {
  483. if (this.connectionIndicator)
  484. this.connectionIndicator.remove();
  485. };
  486. RemoteVideo.prototype.hideConnectionIndicator = function () {
  487. if (this.connectionIndicator)
  488. this.connectionIndicator.hide();
  489. };
  490. /**
  491. * Sets the display name for the given video span id.
  492. *
  493. * @param displayName the display name to set
  494. */
  495. RemoteVideo.prototype.setDisplayName = function(displayName) {
  496. if (!this.container) {
  497. logger.warn( "Unable to set displayName - " + this.videoSpanId +
  498. " does not exist");
  499. return;
  500. }
  501. var nameSpan = $('#' + this.videoSpanId + ' .displayname');
  502. // If we already have a display name for this video.
  503. if (nameSpan.length > 0) {
  504. if (displayName && displayName.length > 0) {
  505. var displaynameSpan = $('#' + this.videoSpanId + '_name');
  506. if (displaynameSpan.text() !== displayName)
  507. displaynameSpan.text(displayName);
  508. }
  509. else
  510. $('#' + this.videoSpanId + '_name').text(
  511. interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME);
  512. } else {
  513. nameSpan = document.createElement('span');
  514. nameSpan.className = 'displayname';
  515. $('#' + this.videoSpanId)[0]
  516. .appendChild(nameSpan);
  517. if (displayName && displayName.length > 0) {
  518. $(nameSpan).text(displayName);
  519. } else {
  520. nameSpan.innerHTML = interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
  521. }
  522. nameSpan.id = this.videoSpanId + '_name';
  523. }
  524. };
  525. /**
  526. * Removes remote video menu element from video element identified by
  527. * given <tt>videoElementId</tt>.
  528. *
  529. * @param videoElementId the id of local or remote video element.
  530. */
  531. RemoteVideo.prototype.removeRemoteVideoMenu = function() {
  532. var menuSpan = $('#' + this.videoSpanId + '> .remotevideomenu');
  533. if (menuSpan.length) {
  534. this.popover.forceHide();
  535. menuSpan.remove();
  536. this.hasRemoteVideoMenu = false;
  537. }
  538. };
  539. RemoteVideo.createContainer = function (spanId) {
  540. let container = document.createElement('span');
  541. container.id = spanId;
  542. container.className = 'videocontainer';
  543. let wrapper = document.createElement('div');
  544. wrapper.className = 'videocontainer__background';
  545. container.appendChild(wrapper);
  546. let indicatorBar = document.createElement('div');
  547. indicatorBar.className = "videocontainer__toptoolbar";
  548. container.appendChild(indicatorBar);
  549. let toolbar = document.createElement('div');
  550. toolbar.className = "videocontainer__toolbar";
  551. container.appendChild(toolbar);
  552. let overlay = document.createElement('div');
  553. overlay.className = "videocontainer__hoverOverlay";
  554. container.appendChild(overlay);
  555. var remotes = document.getElementById('remoteVideos');
  556. return remotes.appendChild(container);
  557. };
  558. /**
  559. * Shows 2 button dialog for confirmation from the user for muting remote
  560. * participant.
  561. */
  562. RemoteVideo.showMuteParticipantDialog = function () {
  563. return new Promise(resolve => {
  564. APP.UI.messageHandler.openTwoButtonDialog({
  565. titleKey : "dialog.muteParticipantTitle",
  566. msgString: "<div data-i18n='dialog.muteParticipantBody'></div>",
  567. leftButtonKey: "dialog.muteParticipantButton",
  568. dontShowAgain: {
  569. id: "dontShowMuteParticipantDialog",
  570. textKey: "dialog.doNotShowMessageAgain",
  571. checked: true,
  572. buttonValues: [true]
  573. },
  574. submitFunction: () => resolve(MUTED_DIALOG_BUTTON_VALUES.muted),
  575. closeFunction: () => resolve(MUTED_DIALOG_BUTTON_VALUES.cancel)
  576. });
  577. });
  578. };
  579. export default RemoteVideo;