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

LargeVideo.js 22KB

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