Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

SmallVideo.js 20KB

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