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.

SmallVideo.js 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. /* global $, JitsiMeetJS, interfaceConfig */
  2. import Avatar from "../avatar/Avatar";
  3. import UIUtil from "../util/UIUtil";
  4. import UIEvents from "../../../service/UI/UIEvents";
  5. import AudioLevels from "../audio_levels/AudioLevels";
  6. const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
  7. /**
  8. * Display mode constant used when video is being displayed on the small video.
  9. * @type {number}
  10. * @constant
  11. */
  12. const DISPLAY_VIDEO = 0;
  13. /**
  14. * Display mode constant used when the user's avatar is being displayed on
  15. * the small video.
  16. * @type {number}
  17. * @constant
  18. */
  19. const DISPLAY_AVATAR = 1;
  20. /**
  21. * Display mode constant used when neither video nor avatar is being displayed
  22. * on the small video. And we just show the display name.
  23. * @type {number}
  24. * @constant
  25. */
  26. const DISPLAY_BLACKNESS_WITH_NAME = 2;
  27. /**
  28. * Display mode constant used when video is displayed and display name
  29. * at the same time.
  30. * @type {number}
  31. * @constant
  32. */
  33. const DISPLAY_VIDEO_WITH_NAME = 3;
  34. /**
  35. * Display mode constant used when neither video nor avatar is being displayed
  36. * on the small video. And we just show the display name.
  37. * @type {number}
  38. * @constant
  39. */
  40. const DISPLAY_AVATAR_WITH_NAME = 4;
  41. function SmallVideo(VideoLayout) {
  42. this.isAudioMuted = false;
  43. this.hasAvatar = false;
  44. this.isVideoMuted = false;
  45. this.videoStream = null;
  46. this.audioStream = null;
  47. this.VideoLayout = VideoLayout;
  48. this.videoIsHovered = false;
  49. this.hideDisplayName = false;
  50. // we can stop updating the thumbnail
  51. this.disableUpdateView = false;
  52. }
  53. /**
  54. * Returns the identifier of this small video.
  55. *
  56. * @returns the identifier of this small video
  57. */
  58. SmallVideo.prototype.getId = function () {
  59. return this.id;
  60. };
  61. /* Indicates if this small video is currently visible.
  62. *
  63. * @return <tt>true</tt> if this small video isn't currently visible and
  64. * <tt>false</tt> - otherwise.
  65. */
  66. SmallVideo.prototype.isVisible = function () {
  67. return $('#' + this.videoSpanId).is(':visible');
  68. };
  69. /**
  70. * Enables / disables the device availability icons for this small video.
  71. * @param {enable} set to {true} to enable and {false} to disable
  72. */
  73. SmallVideo.prototype.enableDeviceAvailabilityIcons = function (enable) {
  74. if (typeof enable === "undefined")
  75. return;
  76. this.deviceAvailabilityIconsEnabled = enable;
  77. };
  78. /**
  79. * Sets the device "non" availability icons.
  80. * @param devices the devices, which will be checked for availability
  81. */
  82. SmallVideo.prototype.setDeviceAvailabilityIcons = function (devices) {
  83. if (!this.deviceAvailabilityIconsEnabled)
  84. return;
  85. if(!this.container)
  86. return;
  87. var noMic = $("#" + this.videoSpanId + " > .noMic");
  88. var noVideo = $("#" + this.videoSpanId + " > .noVideo");
  89. noMic.remove();
  90. noVideo.remove();
  91. if (!devices.audio) {
  92. this.container.appendChild(
  93. document.createElement("div")).setAttribute("class", "noMic");
  94. }
  95. if (!devices.video) {
  96. this.container.appendChild(
  97. document.createElement("div")).setAttribute("class", "noVideo");
  98. }
  99. if (!devices.audio && !devices.video) {
  100. noMic.css("background-position", "75%");
  101. noVideo.css("background-position", "25%");
  102. noVideo.css("background-color", "transparent");
  103. }
  104. };
  105. /**
  106. * Sets the type of the video displayed by this instance.
  107. * Note that this is a string without clearly defined or checked values, and
  108. * it is NOT one of the strings defined in service/RTC/VideoType in
  109. * lib-jitsi-meet.
  110. * @param videoType 'camera' or 'desktop', or 'sharedvideo'.
  111. */
  112. SmallVideo.prototype.setVideoType = function (videoType) {
  113. this.videoType = videoType;
  114. };
  115. /**
  116. * Returns the type of the video displayed by this instance.
  117. * Note that this is a string without clearly defined or checked values, and
  118. * it is NOT one of the strings defined in service/RTC/VideoType in
  119. * lib-jitsi-meet.
  120. * @returns {String} 'camera', 'screen', 'sharedvideo', or undefined.
  121. */
  122. SmallVideo.prototype.getVideoType = function () {
  123. return this.videoType;
  124. };
  125. /**
  126. * Creates an audio or video element for a particular MediaStream.
  127. */
  128. SmallVideo.createStreamElement = function (stream) {
  129. let isVideo = stream.isVideoTrack();
  130. let element = isVideo
  131. ? document.createElement('video')
  132. : document.createElement('audio');
  133. if (isVideo) {
  134. element.setAttribute("muted", "true");
  135. }
  136. RTCUIHelper.setAutoPlay(element, true);
  137. element.id = SmallVideo.getStreamElementID(stream);
  138. return element;
  139. };
  140. /**
  141. * Returns the element id for a particular MediaStream.
  142. */
  143. SmallVideo.getStreamElementID = function (stream) {
  144. let isVideo = stream.isVideoTrack();
  145. return (isVideo ? 'remoteVideo_' : 'remoteAudio_') + stream.getId();
  146. };
  147. /**
  148. * Configures hoverIn/hoverOut handlers. Depends on connection indicator.
  149. */
  150. SmallVideo.prototype.bindHoverHandler = function () {
  151. // Add hover handler
  152. $(this.container).hover(
  153. () => {
  154. this.videoIsHovered = true;
  155. this.updateView();
  156. },
  157. () => {
  158. this.videoIsHovered = false;
  159. this.updateView();
  160. }
  161. );
  162. if (this.connectionIndicator) {
  163. this.connectionIndicator.addPopoverHoverListener(
  164. () => {
  165. this.updateView();
  166. });
  167. }
  168. };
  169. /**
  170. * Updates the data for the indicator
  171. * @param id the id of the indicator
  172. * @param percent the percent for connection quality
  173. * @param object the data
  174. */
  175. SmallVideo.prototype.updateStatsIndicator = function (percent, object) {
  176. if(this.connectionIndicator)
  177. this.connectionIndicator.updateConnectionQuality(percent, object);
  178. };
  179. SmallVideo.prototype.hideIndicator = function () {
  180. if(this.connectionIndicator)
  181. this.connectionIndicator.hideIndicator();
  182. };
  183. /**
  184. * Shows / hides the audio muted indicator over small videos.
  185. *
  186. * @param {boolean} isMuted indicates if the muted element should be shown
  187. * or hidden
  188. */
  189. SmallVideo.prototype.showAudioIndicator = function(isMuted) {
  190. let mutedIndicator = this.getAudioMutedIndicator();
  191. if (isMuted) {
  192. UIUtil.showElement(mutedIndicator);
  193. } else {
  194. UIUtil.hideElement(mutedIndicator);
  195. }
  196. this.isAudioMuted = isMuted;
  197. };
  198. /**
  199. * Returns the audio muted indicator jquery object. If it doesn't exists -
  200. * creates it.
  201. *
  202. * @returns {HTMLElement} the audio muted indicator
  203. */
  204. SmallVideo.prototype.getAudioMutedIndicator = function () {
  205. let selector = '#' + this.videoSpanId + ' .audioMuted';
  206. let audioMutedSpan = document.querySelector(selector);
  207. if (audioMutedSpan) {
  208. return audioMutedSpan;
  209. }
  210. audioMutedSpan = document.createElement('span');
  211. audioMutedSpan.className = 'audioMuted toolbar-icon';
  212. UIUtil.setTooltip(audioMutedSpan,
  213. "videothumbnail.mute",
  214. "top");
  215. let mutedIndicator = document.createElement('i');
  216. mutedIndicator.className = 'icon-mic-disabled';
  217. audioMutedSpan.appendChild(mutedIndicator);
  218. this.container
  219. .querySelector('.videocontainer__toolbar')
  220. .appendChild(audioMutedSpan);
  221. return audioMutedSpan;
  222. };
  223. /**
  224. * Shows video muted indicator over small videos and disables/enables avatar
  225. * if video muted.
  226. *
  227. * @param {boolean} isMuted indicates if we should set the view to muted view
  228. * or not
  229. */
  230. SmallVideo.prototype.setVideoMutedView = function(isMuted) {
  231. this.isVideoMuted = isMuted;
  232. this.updateView();
  233. let element = this.getVideoMutedIndicator();
  234. if (isMuted) {
  235. UIUtil.showElement(element);
  236. } else {
  237. UIUtil.hideElement(element);
  238. }
  239. };
  240. /**
  241. * Returns the video muted indicator jquery object. If it doesn't exists -
  242. * creates it.
  243. *
  244. * @returns {jQuery|HTMLElement} the video muted indicator
  245. */
  246. SmallVideo.prototype.getVideoMutedIndicator = function () {
  247. var selector = '#' + this.videoSpanId + ' .videoMuted';
  248. var videoMutedSpan = document.querySelector(selector);
  249. if (videoMutedSpan) {
  250. return videoMutedSpan;
  251. }
  252. videoMutedSpan = document.createElement('span');
  253. videoMutedSpan.className = 'videoMuted toolbar-icon';
  254. this.container
  255. .querySelector('.videocontainer__toolbar')
  256. .appendChild(videoMutedSpan);
  257. var mutedIndicator = document.createElement('i');
  258. mutedIndicator.className = 'icon-camera-disabled';
  259. UIUtil.setTooltip(mutedIndicator,
  260. "videothumbnail.videomute",
  261. "top");
  262. videoMutedSpan.appendChild(mutedIndicator);
  263. return videoMutedSpan;
  264. };
  265. /**
  266. * Adds the element indicating the moderator(owner) of the conference.
  267. */
  268. SmallVideo.prototype.addModeratorIndicator = function () {
  269. // Don't create moderator indicator if DISABLE_FOCUS_INDICATOR is true
  270. if (interfaceConfig.DISABLE_FOCUS_INDICATOR)
  271. return false;
  272. // Show moderator indicator
  273. var indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
  274. if (indicatorSpan.length) {
  275. return;
  276. }
  277. indicatorSpan = document.createElement('span');
  278. indicatorSpan.className = 'focusindicator toolbar-icon right';
  279. this.container
  280. .querySelector('.videocontainer__toolbar')
  281. .appendChild(indicatorSpan);
  282. var moderatorIndicator = document.createElement('i');
  283. moderatorIndicator.className = 'icon-star';
  284. UIUtil.setTooltip(moderatorIndicator,
  285. "videothumbnail.moderator",
  286. "top-left");
  287. indicatorSpan.appendChild(moderatorIndicator);
  288. };
  289. /**
  290. * Adds the element indicating the audio level of the participant.
  291. */
  292. SmallVideo.prototype.addAudioLevelIndicator = function () {
  293. var audioSpan = $('#' + this.videoSpanId + ' .audioindicator');
  294. if (audioSpan.length) {
  295. return;
  296. }
  297. this.container.appendChild(
  298. AudioLevels.createThumbnailAudioLevelIndicator());
  299. };
  300. /**
  301. * Updates the audio level for this small video.
  302. *
  303. * @param lvl the new audio level to set
  304. */
  305. SmallVideo.prototype.updateAudioLevelIndicator = function (lvl) {
  306. AudioLevels.updateThumbnailAudioLevel(this.videoSpanId, lvl);
  307. };
  308. /**
  309. * Removes the element indicating the moderator(owner) of the conference.
  310. */
  311. SmallVideo.prototype.removeModeratorIndicator = function () {
  312. $('#' + this.videoSpanId + ' .focusindicator').remove();
  313. };
  314. /**
  315. * This is an especially interesting function. A naive reader might think that
  316. * it returns this SmallVideo's "video" element. But it is much more exciting.
  317. * It first finds this video's parent element using jquery, then uses a utility
  318. * from lib-jitsi-meet to extract the video element from it (with two more
  319. * jquery calls), and finally uses jquery again to encapsulate the video element
  320. * in an array. This last step allows (some might prefer "forces") users of
  321. * this function to access the video element via the 0th element of the returned
  322. * array (after checking its length of course!).
  323. */
  324. SmallVideo.prototype.selectVideoElement = function () {
  325. return $(RTCUIHelper.findVideoElement($('#' + this.videoSpanId)[0]));
  326. };
  327. /**
  328. * Selects the HTML image element which displays user's avatar.
  329. *
  330. * @return {jQuery|HTMLElement} a jQuery selector pointing to the HTML image
  331. * element which displays the user's avatar.
  332. */
  333. SmallVideo.prototype.$avatar = function () {
  334. return $('#' + this.videoSpanId + ' .userAvatar');
  335. };
  336. /**
  337. * Returns the display name element, which appears on the video thumbnail.
  338. *
  339. * @return {jQuery} a jQuery selector pointing to the display name element of
  340. * the video thumbnail
  341. */
  342. SmallVideo.prototype.$displayName = function () {
  343. return $('#' + this.videoSpanId + ' .displayname');
  344. };
  345. /**
  346. * Enables / disables the css responsible for focusing/pinning a video
  347. * thumbnail.
  348. *
  349. * @param isFocused indicates if the thumbnail should be focused/pinned or not
  350. */
  351. SmallVideo.prototype.focus = function(isFocused) {
  352. var focusedCssClass = "videoContainerFocused";
  353. var isFocusClassEnabled = $(this.container).hasClass(focusedCssClass);
  354. if (!isFocused && isFocusClassEnabled) {
  355. $(this.container).removeClass(focusedCssClass);
  356. }
  357. else if (isFocused && !isFocusClassEnabled) {
  358. $(this.container).addClass(focusedCssClass);
  359. }
  360. };
  361. SmallVideo.prototype.hasVideo = function () {
  362. return this.selectVideoElement().length !== 0;
  363. };
  364. /**
  365. * Checks whether the user associated with this <tt>SmallVideo</tt> is currently
  366. * being displayed on the "large video".
  367. *
  368. * @return {boolean} <tt>true</tt> if the user is displayed on the large video
  369. * or <tt>false</tt> otherwise.
  370. */
  371. SmallVideo.prototype.isCurrentlyOnLargeVideo = function () {
  372. return this.VideoLayout.isCurrentlyOnLarge(this.id);
  373. };
  374. /**
  375. * Checks whether there is a playable video stream available for the user
  376. * associated with this <tt>SmallVideo</tt>.
  377. *
  378. * @return {boolean} <tt>true</tt> if there is a playable video stream available
  379. * or <tt>false</tt> otherwise.
  380. */
  381. SmallVideo.prototype.isVideoPlayable = function() {
  382. return this.videoStream // Is there anything to display ?
  383. && !this.isVideoMuted && !this.videoStream.isMuted() // Muted ?
  384. && (this.isLocal || this.VideoLayout.isInLastN(this.id));
  385. };
  386. /**
  387. * Determines what should be display on the thumbnail.
  388. *
  389. * @return {number} one of <tt>DISPLAY_VIDEO</tt>,<tt>DISPLAY_AVATAR</tt>
  390. * or <tt>DISPLAY_BLACKNESS_WITH_NAME</tt>.
  391. */
  392. SmallVideo.prototype.selectDisplayMode = function() {
  393. // Display name is always and only displayed when user is on the stage
  394. if (this.isCurrentlyOnLargeVideo()) {
  395. return DISPLAY_BLACKNESS_WITH_NAME;
  396. } else if (this.isVideoPlayable() && this.selectVideoElement().length) {
  397. // check hovering and change state to video with name
  398. return this._isHovered() ?
  399. DISPLAY_VIDEO_WITH_NAME : DISPLAY_VIDEO;
  400. } else {
  401. // check hovering and change state to avatar with name
  402. return this._isHovered() ?
  403. DISPLAY_AVATAR_WITH_NAME : DISPLAY_AVATAR;
  404. }
  405. };
  406. /**
  407. * Checks whether current video is considered hovered. Currently it is hovered
  408. * if the mouse is over the video, or if the connection
  409. * indicator is shown(hovered).
  410. * @private
  411. */
  412. SmallVideo.prototype._isHovered = function () {
  413. return this.videoIsHovered
  414. || (this.connectionIndicator
  415. && this.connectionIndicator.popover.popoverIsHovered);
  416. };
  417. /**
  418. * Hides or shows the user's avatar.
  419. * This update assumes that large video had been updated and we will
  420. * reflect it on this small video.
  421. *
  422. * @param show whether we should show the avatar or not
  423. * video because there is no dominant speaker and no focused speaker
  424. */
  425. SmallVideo.prototype.updateView = function () {
  426. if (this.disableUpdateView)
  427. return;
  428. if (!this.hasAvatar) {
  429. if (this.id) {
  430. // Init avatar
  431. this.avatarChanged(Avatar.getAvatarUrl(this.id));
  432. } else {
  433. console.error("Unable to init avatar - no id", this);
  434. return;
  435. }
  436. }
  437. // Determine whether video, avatar or blackness should be displayed
  438. let displayMode = this.selectDisplayMode();
  439. // Show/hide video.
  440. UIUtil.setVisibility( this.selectVideoElement(),
  441. (displayMode === DISPLAY_VIDEO
  442. || displayMode === DISPLAY_VIDEO_WITH_NAME));
  443. // Show/hide the avatar.
  444. UIUtil.setVisibility( this.$avatar(),
  445. (displayMode === DISPLAY_AVATAR
  446. || displayMode === DISPLAY_AVATAR_WITH_NAME));
  447. // Show/hide the display name.
  448. UIUtil.setVisibility( this.$displayName(),
  449. !this.hideDisplayName
  450. && (displayMode === DISPLAY_BLACKNESS_WITH_NAME
  451. || displayMode === DISPLAY_VIDEO_WITH_NAME
  452. || displayMode === DISPLAY_AVATAR_WITH_NAME));
  453. // show hide overlay when there is a video or avatar under
  454. // the display name
  455. UIUtil.setVisibility( $('#' + this.videoSpanId
  456. + ' .videocontainer__hoverOverlay'),
  457. (displayMode === DISPLAY_AVATAR_WITH_NAME
  458. || displayMode === DISPLAY_VIDEO_WITH_NAME));
  459. };
  460. SmallVideo.prototype.avatarChanged = function (avatarUrl) {
  461. var thumbnail = $('#' + this.videoSpanId);
  462. var avatarSel = this.$avatar();
  463. this.hasAvatar = true;
  464. // set the avatar in the thumbnail
  465. if (avatarSel && avatarSel.length > 0) {
  466. avatarSel[0].src = avatarUrl;
  467. } else {
  468. if (thumbnail && thumbnail.length > 0) {
  469. var avatarElement = document.createElement('img');
  470. avatarElement.className = 'userAvatar';
  471. avatarElement.src = avatarUrl;
  472. thumbnail.append(avatarElement);
  473. }
  474. }
  475. };
  476. /**
  477. * Shows or hides the dominant speaker indicator.
  478. * @param show whether to show or hide.
  479. */
  480. SmallVideo.prototype.showDominantSpeakerIndicator = function (show) {
  481. // Don't create and show dominant speaker indicator if
  482. // DISABLE_DOMINANT_SPEAKER_INDICATOR is true
  483. if (interfaceConfig.DISABLE_DOMINANT_SPEAKER_INDICATOR)
  484. return;
  485. if (!this.container) {
  486. console.warn( "Unable to set dominant speaker indicator - "
  487. + this.videoSpanId + " does not exist");
  488. return;
  489. }
  490. let indicatorSpanId = "dominantspeakerindicator";
  491. let content = `<i id="indicatoricon"
  492. ' class="indicatoricon fa fa-bullhorn"></i>`;
  493. let indicatorSpan = UIUtil.getVideoThumbnailIndicatorSpan({
  494. videoSpanId: this.videoSpanId,
  495. indicatorId: indicatorSpanId,
  496. content,
  497. tooltip: 'speaker'
  498. });
  499. if (show) {
  500. UIUtil.showElement(indicatorSpan);
  501. } else {
  502. UIUtil.hideElement(indicatorSpan);
  503. }
  504. };
  505. /**
  506. * Shows or hides the raised hand indicator.
  507. * @param show whether to show or hide.
  508. */
  509. SmallVideo.prototype.showRaisedHandIndicator = function (show) {
  510. if (!this.container) {
  511. console.warn( "Unable to raised hand indication - "
  512. + this.videoSpanId + " does not exist");
  513. return;
  514. }
  515. let indicatorSpanId = "raisehandindicator";
  516. let content = `<i id="indicatoricon"
  517. class="icon-raised-hand indicatoricon"></i>`;
  518. let indicatorSpan = UIUtil.getVideoThumbnailIndicatorSpan({
  519. indicatorId: indicatorSpanId,
  520. videoSpanId: this.videoSpanId,
  521. content,
  522. tooltip: 'raisedHand'
  523. });
  524. if (show) {
  525. UIUtil.showElement(indicatorSpan);
  526. } else {
  527. UIUtil.hideElement(indicatorSpan);
  528. }
  529. };
  530. /**
  531. * Adds a listener for onresize events for this video, which will monitor for
  532. * resolution changes, will calculate the delay since the moment the listened
  533. * is added, and will fire a RESOLUTION_CHANGED event.
  534. */
  535. SmallVideo.prototype.waitForResolutionChange = function() {
  536. let beforeChange = window.performance.now();
  537. let videos = this.selectVideoElement();
  538. if (!videos || !videos.length || videos.length <= 0)
  539. return;
  540. let video = videos[0];
  541. let oldWidth = video.videoWidth;
  542. let oldHeight = video.videoHeight;
  543. video.onresize = () => {
  544. if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
  545. // Only run once.
  546. video.onresize = null;
  547. let delay = window.performance.now() - beforeChange;
  548. let emitter = this.VideoLayout.getEventEmitter();
  549. if (emitter) {
  550. emitter.emit(
  551. UIEvents.RESOLUTION_CHANGED,
  552. this.getId(),
  553. oldWidth + "x" + oldHeight,
  554. video.videoWidth + "x" + video.videoHeight,
  555. delay);
  556. }
  557. }
  558. };
  559. };
  560. /**
  561. * Initalizes any browser specific properties. Currently sets the overflow
  562. * property for Qt browsers on Windows to hidden, thus fixing the following
  563. * problem:
  564. * Some browsers don't have full support of the object-fit property for the
  565. * video element and when we set video object-fit to "cover" the video
  566. * actually overflows the boundaries of its container, so it's important
  567. * to indicate that the "overflow" should be hidden.
  568. *
  569. * Setting this property for all browsers will result in broken audio levels,
  570. * which makes this a temporary solution, before reworking audio levels.
  571. */
  572. SmallVideo.prototype.initBrowserSpecificProperties = function() {
  573. var userAgent = window.navigator.userAgent;
  574. if (userAgent.indexOf("QtWebEngine") > -1
  575. && (userAgent.indexOf("Windows") > -1
  576. || userAgent.indexOf("Linux") > -1)) {
  577. $('#' + this.videoSpanId).css("overflow", "hidden");
  578. }
  579. };
  580. export default SmallVideo;