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

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