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

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