您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

LargeVideo.js 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /* global $, APP, Strophe, interfaceConfig */
  2. /* jshint -W101 */
  3. var Avatar = require("../avatar/Avatar");
  4. var RTCBrowserType = require("../../RTC/RTCBrowserType");
  5. var UIUtil = require("../util/UIUtil");
  6. var UIEvents = require("../../../service/UI/UIEvents");
  7. var xmpp = require("../../xmpp/xmpp");
  8. var ToolbarToggler = require("../toolbars/ToolbarToggler");
  9. // FIXME: With Temasys we have to re-select everytime
  10. //var video = $('#largeVideo');
  11. var currentVideoWidth = null;
  12. var currentVideoHeight = null;
  13. // By default we use camera
  14. var getVideoSize = getCameraVideoSize;
  15. var getVideoPosition = getCameraVideoPosition;
  16. /**
  17. * The small video instance that is displayed in the large video
  18. * @type {SmallVideo}
  19. */
  20. var currentSmallVideo = null;
  21. /**
  22. * Indicates whether the large video is enabled.
  23. * @type {boolean}
  24. */
  25. var isEnabled = true;
  26. /**
  27. * Current large video state.
  28. * Possible values - video, prezi or etherpad.
  29. * @type {string}
  30. */
  31. var state = "video";
  32. /**
  33. * Returns the html element associated with the passed state of large video
  34. * @param state the state.
  35. * @returns {JQuery|*|jQuery|HTMLElement} the container.
  36. */
  37. function getContainerByState(state)
  38. {
  39. var selector = null;
  40. switch (state)
  41. {
  42. case "video":
  43. selector = "#largeVideoWrapper";
  44. break;
  45. case "etherpad":
  46. selector = "#etherpad>iframe";
  47. break;
  48. case "prezi":
  49. selector = "#presentation>iframe";
  50. break;
  51. }
  52. return (selector !== null)? $(selector) : null;
  53. }
  54. /**
  55. * Sets the size and position of the given video element.
  56. *
  57. * @param video the video element to position
  58. * @param width the desired video width
  59. * @param height the desired video height
  60. * @param horizontalIndent the left and right indent
  61. * @param verticalIndent the top and bottom indent
  62. */
  63. function positionVideo(video,
  64. width,
  65. height,
  66. horizontalIndent,
  67. verticalIndent,
  68. animate) {
  69. if (animate) {
  70. video.animate({
  71. width: width,
  72. height: height,
  73. top: verticalIndent,
  74. bottom: verticalIndent,
  75. left: horizontalIndent,
  76. right: horizontalIndent
  77. },
  78. {
  79. queue: false,
  80. duration: 500
  81. });
  82. } else {
  83. video.width(width);
  84. video.height(height);
  85. video.css({ top: verticalIndent + 'px',
  86. bottom: verticalIndent + 'px',
  87. left: horizontalIndent + 'px',
  88. right: horizontalIndent + 'px'});
  89. }
  90. }
  91. /**
  92. * Returns an array of the video dimensions, so that it keeps it's aspect
  93. * ratio and fits available area with it's larger dimension. This method
  94. * ensures that whole video will be visible and can leave empty areas.
  95. *
  96. * @return an array with 2 elements, the video width and the video height
  97. */
  98. function getDesktopVideoSize(videoWidth,
  99. videoHeight,
  100. videoSpaceWidth,
  101. videoSpaceHeight) {
  102. if (!videoWidth)
  103. videoWidth = currentVideoWidth;
  104. if (!videoHeight)
  105. videoHeight = currentVideoHeight;
  106. var aspectRatio = videoWidth / videoHeight;
  107. var availableWidth = Math.max(videoWidth, videoSpaceWidth);
  108. var availableHeight = Math.max(videoHeight, videoSpaceHeight);
  109. videoSpaceHeight -= $('#remoteVideos').outerHeight();
  110. if (availableWidth / aspectRatio >= videoSpaceHeight)
  111. {
  112. availableHeight = videoSpaceHeight;
  113. availableWidth = availableHeight * aspectRatio;
  114. }
  115. if (availableHeight * aspectRatio >= videoSpaceWidth)
  116. {
  117. availableWidth = videoSpaceWidth;
  118. availableHeight = availableWidth / aspectRatio;
  119. }
  120. return [availableWidth, availableHeight];
  121. }
  122. /**
  123. * Returns an array of the video horizontal and vertical indents,
  124. * so that if fits its parent.
  125. *
  126. * @return an array with 2 elements, the horizontal indent and the vertical
  127. * indent
  128. */
  129. function getCameraVideoPosition(videoWidth,
  130. videoHeight,
  131. videoSpaceWidth,
  132. videoSpaceHeight) {
  133. // Parent height isn't completely calculated when we position the video in
  134. // full screen mode and this is why we use the screen height in this case.
  135. // Need to think it further at some point and implement it properly.
  136. var isFullScreen = document.fullScreen ||
  137. document.mozFullScreen ||
  138. document.webkitIsFullScreen;
  139. if (isFullScreen)
  140. videoSpaceHeight = window.innerHeight;
  141. var horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
  142. var verticalIndent = (videoSpaceHeight - videoHeight) / 2;
  143. return [horizontalIndent, verticalIndent];
  144. }
  145. /**
  146. * Returns an array of the video horizontal and vertical indents.
  147. * Centers horizontally and top aligns vertically.
  148. *
  149. * @return an array with 2 elements, the horizontal indent and the vertical
  150. * indent
  151. */
  152. function getDesktopVideoPosition(videoWidth,
  153. videoHeight,
  154. videoSpaceWidth,
  155. videoSpaceHeight) {
  156. var horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
  157. var verticalIndent = 0;// Top aligned
  158. return [horizontalIndent, verticalIndent];
  159. }
  160. /**
  161. * Returns an array of the video dimensions, so that it covers the screen.
  162. * It leaves no empty areas, but some parts of the video might not be visible.
  163. *
  164. * @return an array with 2 elements, the video width and the video height
  165. */
  166. function getCameraVideoSize(videoWidth,
  167. videoHeight,
  168. videoSpaceWidth,
  169. videoSpaceHeight) {
  170. if (!videoWidth)
  171. videoWidth = currentVideoWidth;
  172. if (!videoHeight)
  173. videoHeight = currentVideoHeight;
  174. var aspectRatio = videoWidth / videoHeight;
  175. var availableWidth = Math.max(videoWidth, videoSpaceWidth);
  176. var availableHeight = Math.max(videoHeight, videoSpaceHeight);
  177. if (availableWidth / aspectRatio < videoSpaceHeight) {
  178. availableHeight = videoSpaceHeight;
  179. availableWidth = availableHeight * aspectRatio;
  180. }
  181. if (availableHeight * aspectRatio < videoSpaceWidth) {
  182. availableWidth = videoSpaceWidth;
  183. availableHeight = availableWidth / aspectRatio;
  184. }
  185. return [availableWidth, availableHeight];
  186. }
  187. /**
  188. * Updates the src of the active speaker avatar
  189. * @param jid of the current active speaker
  190. */
  191. function updateActiveSpeakerAvatarSrc() {
  192. var avatar = $("#activeSpeakerAvatar")[0];
  193. var jid = currentSmallVideo.peerJid;
  194. var url = Avatar.getActiveSpeakerUrl(jid);
  195. if (avatar.src === url)
  196. return;
  197. if (jid) {
  198. avatar.src = url;
  199. currentSmallVideo.showAvatar();
  200. }
  201. }
  202. /**
  203. * Change the video source of the large video.
  204. * @param isVisible
  205. */
  206. function changeVideo(isVisible) {
  207. if (!currentSmallVideo) {
  208. console.error("Unable to change large video - no 'currentSmallVideo'");
  209. return;
  210. }
  211. updateActiveSpeakerAvatarSrc();
  212. var largeVideoElement = $('#largeVideo')[0];
  213. APP.RTC.setVideoSrc(largeVideoElement, currentSmallVideo.getSrc());
  214. var flipX = currentSmallVideo.flipX;
  215. largeVideoElement.style.transform = flipX ? "scaleX(-1)" : "none";
  216. var isDesktop = currentSmallVideo.getVideoType() === 'screen';
  217. // Change the way we'll be measuring and positioning large video
  218. getVideoSize = isDesktop ? getDesktopVideoSize : getCameraVideoSize;
  219. getVideoPosition = isDesktop ? getDesktopVideoPosition :
  220. getCameraVideoPosition;
  221. // Only if the large video is currently visible.
  222. if (isVisible) {
  223. LargeVideo.VideoLayout.largeVideoUpdated(currentSmallVideo);
  224. $('#largeVideoWrapper').fadeTo(300, 1);
  225. }
  226. }
  227. /**
  228. * Creates the html elements for the large video.
  229. */
  230. function createLargeVideoHTML()
  231. {
  232. var html = '<div id="largeVideoContainer" class="videocontainer">';
  233. html += '<div id="presentation"></div>' +
  234. '<div id="etherpad"></div>' +
  235. '<a target="_new"><div class="watermark leftwatermark"></div></a>' +
  236. '<a target="_new"><div class="watermark rightwatermark"></div></a>' +
  237. '<a class="poweredby" href="http://jitsi.org" target="_new" >' +
  238. '<span data-i18n="poweredby"></span> jitsi.org' +
  239. '</a>'+
  240. '<div id="activeSpeaker">' +
  241. '<img id="activeSpeakerAvatar" src=""/>' +
  242. '<canvas id="activeSpeakerAudioLevel"></canvas>' +
  243. '</div>' +
  244. '<div id="largeVideoWrapper">' +
  245. '<video id="largeVideo" autoplay oncontextmenu="return false;"></video>' +
  246. '</div id="largeVideoWrapper">' +
  247. '<span id="videoConnectionMessage"></span>';
  248. html += '</div>';
  249. $(html).prependTo("#videospace");
  250. if (interfaceConfig.SHOW_JITSI_WATERMARK) {
  251. var leftWatermarkDiv
  252. = $("#largeVideoContainer div[class='watermark leftwatermark']");
  253. leftWatermarkDiv.css({display: 'block'});
  254. leftWatermarkDiv.parent().get(0).href
  255. = interfaceConfig.JITSI_WATERMARK_LINK;
  256. }
  257. if (interfaceConfig.SHOW_BRAND_WATERMARK) {
  258. var rightWatermarkDiv
  259. = $("#largeVideoContainer div[class='watermark rightwatermark']");
  260. rightWatermarkDiv.css({display: 'block'});
  261. rightWatermarkDiv.parent().get(0).href
  262. = interfaceConfig.BRAND_WATERMARK_LINK;
  263. rightWatermarkDiv.get(0).style.backgroundImage
  264. = "url(images/rightwatermark.png)";
  265. }
  266. if (interfaceConfig.SHOW_POWERED_BY) {
  267. $("#largeVideoContainer>a[class='poweredby']").css({display: 'block'});
  268. }
  269. if (!RTCBrowserType.isIExplorer()) {
  270. $('#largeVideo').volume = 0;
  271. }
  272. }
  273. var LargeVideo = {
  274. init: function (VideoLayout, emitter) {
  275. if(!isEnabled)
  276. return;
  277. createLargeVideoHTML();
  278. this.VideoLayout = VideoLayout;
  279. this.eventEmitter = emitter;
  280. this.eventEmitter.emit(UIEvents.LARGEVIDEO_INIT);
  281. var self = this;
  282. // Listen for large video size updates
  283. var largeVideo = $('#largeVideo')[0];
  284. var onplaying = function (arg1, arg2, arg3) {
  285. // re-select
  286. if (RTCBrowserType.isTemasysPluginUsed())
  287. largeVideo = $('#largeVideo')[0];
  288. currentVideoWidth = largeVideo.videoWidth;
  289. currentVideoHeight = largeVideo.videoHeight;
  290. self.position(currentVideoWidth, currentVideoHeight);
  291. };
  292. largeVideo.onplaying = onplaying;
  293. },
  294. /**
  295. * Indicates if the large video is currently visible.
  296. *
  297. * @return <tt>true</tt> if visible, <tt>false</tt> - otherwise
  298. */
  299. isLargeVideoVisible: function() {
  300. return $('#largeVideoWrapper').is(':visible');
  301. },
  302. /**
  303. * Returns <tt>true</tt> if the user is currently displayed on large video.
  304. */
  305. isCurrentlyOnLarge: function (resourceJid) {
  306. return currentSmallVideo && resourceJid &&
  307. currentSmallVideo.getResourceJid() === resourceJid;
  308. },
  309. /**
  310. * Updates the large video with the given new video source.
  311. */
  312. updateLargeVideo: function (resourceJid, forceUpdate) {
  313. if(!isEnabled)
  314. return;
  315. var newSmallVideo = this.VideoLayout.getSmallVideo(resourceJid);
  316. console.log('hover in ' + resourceJid + ', video: ', newSmallVideo);
  317. if (!newSmallVideo) {
  318. console.error("Small video not found for: " + resourceJid);
  319. return;
  320. }
  321. if (!LargeVideo.isCurrentlyOnLarge(resourceJid) || forceUpdate) {
  322. $('#activeSpeaker').css('visibility', 'hidden');
  323. var oldSmallVideo = null;
  324. if (currentSmallVideo) {
  325. oldSmallVideo = currentSmallVideo;
  326. }
  327. currentSmallVideo = newSmallVideo;
  328. var oldJid = null;
  329. if (oldSmallVideo)
  330. oldJid = oldSmallVideo.peerJid;
  331. if (oldJid !== resourceJid) {
  332. // we want the notification to trigger even if userJid is undefined,
  333. // or null.
  334. this.eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, resourceJid);
  335. }
  336. // We are doing fadeOut/fadeIn animations on parent div which wraps
  337. // largeVideo, because when Temasys plugin is in use it replaces
  338. // <video> elements with plugin <object> tag. In Safari jQuery is
  339. // unable to store values on this plugin object which breaks all
  340. // animation effects performed on it directly.
  341. //
  342. // If for any reason large video was hidden before calling fadeOut
  343. // changeVideo will never be called, so we call show() in chain just
  344. // to be sure
  345. $('#largeVideoWrapper').show().fadeTo(300, 0,
  346. changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
  347. } else {
  348. if (currentSmallVideo) {
  349. currentSmallVideo.showAvatar();
  350. }
  351. }
  352. },
  353. /**
  354. * Shows/hides the large video.
  355. */
  356. setLargeVideoVisible: function(isVisible) {
  357. if(!isEnabled)
  358. return;
  359. if (isVisible) {
  360. $('#largeVideoWrapper').css({visibility: 'visible'});
  361. $('.watermark').css({visibility: 'visible'});
  362. if(currentSmallVideo)
  363. currentSmallVideo.enableDominantSpeaker(true);
  364. }
  365. else {
  366. $('#largeVideoWrapper').css({visibility: 'hidden'});
  367. $('#activeSpeaker').css('visibility', 'hidden');
  368. $('.watermark').css({visibility: 'hidden'});
  369. if(currentSmallVideo)
  370. currentSmallVideo.enableDominantSpeaker(false);
  371. }
  372. },
  373. onVideoTypeChanged: function (resourceJid, newVideoType) {
  374. if (!isEnabled)
  375. return;
  376. if (LargeVideo.isCurrentlyOnLarge(resourceJid))
  377. {
  378. var isDesktop = newVideoType === 'screen';
  379. getVideoSize = isDesktop ? getDesktopVideoSize : getCameraVideoSize;
  380. getVideoPosition = isDesktop ? getDesktopVideoPosition
  381. : getCameraVideoPosition;
  382. this.position(null, null, null, null, true);
  383. }
  384. },
  385. /**
  386. * Positions the large video.
  387. *
  388. * @param videoWidth the stream video width
  389. * @param videoHeight the stream video height
  390. */
  391. position: function (videoWidth, videoHeight,
  392. videoSpaceWidth, videoSpaceHeight, animate) {
  393. if(!isEnabled)
  394. return;
  395. if(!videoSpaceWidth)
  396. videoSpaceWidth = $('#videospace').width();
  397. if(!videoSpaceHeight)
  398. videoSpaceHeight = window.innerHeight;
  399. var videoSize = getVideoSize(videoWidth,
  400. videoHeight,
  401. videoSpaceWidth,
  402. videoSpaceHeight);
  403. var largeVideoWidth = videoSize[0];
  404. var largeVideoHeight = videoSize[1];
  405. var videoPosition = getVideoPosition(largeVideoWidth,
  406. largeVideoHeight,
  407. videoSpaceWidth,
  408. videoSpaceHeight);
  409. var horizontalIndent = videoPosition[0];
  410. var verticalIndent = videoPosition[1];
  411. positionVideo($('#largeVideoWrapper'),
  412. largeVideoWidth,
  413. largeVideoHeight,
  414. horizontalIndent, verticalIndent, animate);
  415. },
  416. /**
  417. * Resizes the large html elements.
  418. * @param animate boolean property that indicates whether the resize should be animated or not.
  419. * @param isChatVisible boolean property that indicates whether the chat area is displayed or not.
  420. * If that parameter is null the method will check the chat pannel visibility.
  421. * @param completeFunction a function to be called when the video space is resized
  422. * @returns {*[]} array with the current width and height values of the largeVideo html element.
  423. */
  424. resize: function (animate, isVisible, completeFunction) {
  425. if(!isEnabled)
  426. return;
  427. var availableHeight = window.innerHeight;
  428. var availableWidth = UIUtil.getAvailableVideoWidth(isVisible);
  429. if (availableWidth < 0 || availableHeight < 0) return;
  430. var avatarSize = interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE;
  431. var top = availableHeight / 2 - avatarSize / 4 * 3;
  432. $('#activeSpeaker').css('top', top);
  433. this.VideoLayout.resizeVideoSpace(animate, isVisible, completeFunction);
  434. if(animate) {
  435. $('#largeVideoContainer').animate({
  436. width: availableWidth,
  437. height: availableHeight
  438. },
  439. {
  440. queue: false,
  441. duration: 500
  442. });
  443. } else {
  444. $('#largeVideoContainer').width(availableWidth);
  445. $('#largeVideoContainer').height(availableHeight);
  446. }
  447. return [availableWidth, availableHeight];
  448. },
  449. resizeVideoAreaAnimated: function (isVisible, completeFunction) {
  450. if(!isEnabled)
  451. return;
  452. var size = this.resize(true, isVisible, completeFunction);
  453. this.position(null, null, size[0], size[1], true);
  454. },
  455. getResourceJid: function () {
  456. return currentSmallVideo ? currentSmallVideo.getResourceJid() : null;
  457. },
  458. updateAvatar: function (resourceJid) {
  459. if(!isEnabled)
  460. return;
  461. if (resourceJid === this.getResourceJid()) {
  462. updateActiveSpeakerAvatarSrc();
  463. }
  464. },
  465. showAvatar: function (resourceJid, show) {
  466. if (!isEnabled)
  467. return;
  468. if (this.getResourceJid() === resourceJid && state === "video") {
  469. $("#largeVideoWrapper")
  470. .css("visibility", show ? "hidden" : "visible");
  471. $('#activeSpeaker').css("visibility", show ? "visible" : "hidden");
  472. return true;
  473. }
  474. return false;
  475. },
  476. /**
  477. * Disables the large video
  478. */
  479. disable: function () {
  480. isEnabled = false;
  481. },
  482. /**
  483. * Enables the large video
  484. */
  485. enable: function () {
  486. isEnabled = true;
  487. },
  488. /**
  489. * Returns true if the video is enabled.
  490. */
  491. isEnabled: function () {
  492. return isEnabled;
  493. },
  494. /**
  495. * Creates the iframe used by the etherpad
  496. * @param src the value for src attribute
  497. * @param onloadHandler handler executed when the iframe loads it content
  498. * @returns {HTMLElement} the iframe
  499. */
  500. createEtherpadIframe: function (src, onloadHandler) {
  501. if(!isEnabled)
  502. return;
  503. var etherpadIFrame = document.createElement('iframe');
  504. etherpadIFrame.src = src;
  505. etherpadIFrame.frameBorder = 0;
  506. etherpadIFrame.scrolling = "no";
  507. etherpadIFrame.width = $('#largeVideoContainer').width() || 640;
  508. etherpadIFrame.height = $('#largeVideoContainer').height() || 480;
  509. etherpadIFrame.setAttribute('style', 'visibility: hidden;');
  510. document.getElementById('etherpad').appendChild(etherpadIFrame);
  511. etherpadIFrame.onload = onloadHandler;
  512. return etherpadIFrame;
  513. },
  514. /**
  515. * Changes the state of the large video.
  516. * Possible values - video, prezi, etherpad.
  517. * @param newState - the new state
  518. */
  519. setState: function (newState) {
  520. if(state === newState)
  521. return;
  522. var currentContainer = getContainerByState(state);
  523. if(!currentContainer)
  524. return;
  525. var self = this;
  526. var oldState = state;
  527. switch (newState)
  528. {
  529. case "etherpad":
  530. $('#activeSpeaker').css('visibility', 'hidden');
  531. currentContainer.fadeOut(300, function () {
  532. if (oldState === "prezi") {
  533. currentContainer.css({opacity: '0'});
  534. $('#reloadPresentation').css({display: 'none'});
  535. }
  536. else {
  537. self.setLargeVideoVisible(false);
  538. }
  539. });
  540. $('#etherpad>iframe').fadeIn(300, function () {
  541. document.body.style.background = '#eeeeee';
  542. $('#etherpad>iframe').css({visibility: 'visible'});
  543. $('#etherpad').css({zIndex: 2});
  544. });
  545. break;
  546. case "prezi":
  547. var prezi = $('#presentation>iframe');
  548. currentContainer.fadeOut(300, function() {
  549. document.body.style.background = 'black';
  550. });
  551. prezi.fadeIn(300, function() {
  552. prezi.css({opacity:'1'});
  553. ToolbarToggler.dockToolbar(true);//fix that
  554. self.setLargeVideoVisible(false);
  555. $('#etherpad>iframe').css({visibility: 'hidden'});
  556. $('#etherpad').css({zIndex: 0});
  557. });
  558. $('#activeSpeaker').css('visibility', 'hidden');
  559. break;
  560. case "video":
  561. currentContainer.fadeOut(300, function () {
  562. $('#presentation>iframe').css({opacity:'0'});
  563. $('#reloadPresentation').css({display:'none'});
  564. $('#etherpad>iframe').css({visibility: 'hidden'});
  565. $('#etherpad').css({zIndex: 0});
  566. document.body.style.background = 'black';
  567. ToolbarToggler.dockToolbar(false);//fix that
  568. });
  569. $('#largeVideoWrapper').fadeIn(300, function () {
  570. self.setLargeVideoVisible(true);
  571. });
  572. break;
  573. }
  574. state = newState;
  575. },
  576. /**
  577. * Returns the current state of the large video.
  578. * @returns {string} the current state - video, prezi or etherpad.
  579. */
  580. getState: function () {
  581. return state;
  582. },
  583. /**
  584. * Sets hover handlers for the large video container div.
  585. *
  586. * @param inHandler
  587. * @param outHandler
  588. */
  589. setHover: function(inHandler, outHandler)
  590. {
  591. $('#largeVideoContainer').hover(inHandler, outHandler);
  592. },
  593. /**
  594. * Enables/disables the filter indicating a video problem to the user.
  595. *
  596. * @param enable <tt>true</tt> to enable, <tt>false</tt> to disable
  597. */
  598. enableVideoProblemFilter: function (enable) {
  599. $("#largeVideo").toggleClass("videoProblemFilter", enable);
  600. }
  601. };
  602. module.exports = LargeVideo;