diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css new file mode 100644 index 0000000000..56dff52da7 --- /dev/null +++ b/dashboard-ui/css/mediaplayer-video.css @@ -0,0 +1,284 @@ +#mediaPlayer .mediaPlayerFlyout { + bottom: 64px; +} + +#videoBackdrop { + z-index: 99990; + position: fixed; + background-color: transparent; + background-color: rgba(0, 0, 0, 0.6); + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +#videoPlayer { + z-index: 99997; + background-color: #1d1d1d; + position: fixed; + border: 1px solid #333; + top: 50%; + left: 50%; + margin-left: -170px; + margin-top: -115px; +} + +.itemVideo { + background-color: #000; + margin: 20px 20px 80px; + width: 320px; + height: 181px; +} + +#videoControls { + z-index: 99999; + padding: 0 20px 10px; + height: 80px; + position: absolute; + top: auto; + right: 0; + bottom: 0; + left: 0; +} + +#videoControls .positionSliderContainer .ui-slider-track { + margin: 0 !important; +} + +#videoControls .positionSliderContainer { + display: block; + width: 100%; + margin-top: 0px; +} + +#videoControls .currentTime { + margin-top: 25px; +} + +/* Fullscreen + ***************************************/ + +#videoPlayer.fullscreenVideo, +#videoPlayer.fullscreenVideo .itemVideo { + position: fixed !important; + top: 0 !important; + bottom: 0 !important; + right: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + border: 0 !important; + margin: 0 !important; + max-width: 100%; + max-height: 100%; +} + +#videoPlayer.fullscreenVideo #videoControls { + opacity: 0.3; + background-color: #1d1d1d; +} + +#videoPlayer.fullscreenVideo #videoControls:hover { + opacity: 0.8; +} + +#videoPlayer.fullscreenVideo .inactive { + display: none; +} + +#videoPlayer.fullscreenVideo:hover .active { + display: block; +} + +/* Media queries + ***************************************/ + +@media all and (min-width: 640px) and (min-height: 360px) { + #mediaPlayer .itemVideo:not(.fullscreenVideo) { + width: 480px; + height: 271px; + } + + #videoPlayer { + margin-left: -250px; + margin-top: -160px; + } +} + +@media all and (min-width: 800px) and (min-height: 450px) { + #mediaPlayer .itemVideo:not(.fullscreenVideo) { + width: 640px; + height: 362px; + } + + #videoPlayer { + margin-left: -330px; + margin-top: -205px; + } +} + +@media all and (min-width: 960px) and (min-height: 540px) { + #mediaPlayer .itemVideo:not(.fullscreenVideo) { + width: 720px; + height: 406px; + } + + #videoPlayer { + margin-left: -370px; + margin-top: -228px; + } +} + +@media all and (min-width: 1200px) and (min-height: 720px) { + #mediaPlayer .itemVideo:not(.fullscreenVideo) { + width: 1080px; + height: 610px; + } + + #videoPlayer { + margin-left: -550px; + margin-top: -329px; + } +} + +@media all and (min-width: 1440px) and (min-height: 720px) { + #mediaPlayer .itemVideo:not(.fullscreenVideo) { + width: 1080px; + height: 610px; + } + + #videoPlayer { + margin-left: -550px; + margin-top: -329px; + } +} + +/****************************************/ + +@media all and (max-width: 1200px), all and (max-height: 720px) { + #mediaPlayer .volumeSliderContainer, #mediaPlayer .sendMediaButton { + display: none!important; + } +} + +@media all and (max-width: 960px), all and (max-height: 550px) { + #mediaPlayer .volumeSliderContainer, #mediaPlayer .audioTracksButton, #mediaPlayer .chaptersButton, #mediaPlayer .sendMediaButton { + display: none!important; + } +} + +@media all and (max-width: 800px), all and (max-height: 460px) { + #mediaPlayer .volumeButton, #mediaPlayer .volumeSliderContainer, #mediaPlayer .muteButton, #mediaPlayer .unmuteButton, #mediaPlayer .nowPlayingMediaInfo, #mediaPlayer .sendMediaButton { + display: none!important; + } +} + +@media all and (max-width: 640px), all and (max-height: 365px) { + #mediaPlayer .chaptersButton, #mediaPlayer .audioTracksButton, #mediaPlayer .qualityButton, #mediaPlayer .subtitleButton { + display: none!important; + } + + #mediaPlayer .currentTime { + margin-top: 15px; + } +} + +@media all and (max-width: 500px) { + #mediaPlayer .previousTrackButton, #mediaPlayer .nextTrackButton { + display: none!important; + } +} + +@media all and (max-width: 400px) { + #mediaPlayer .playlistButton { + display: none!important; + } +} + +/****************************************/ + +.status { + position: absolute; + top: 50%; + left: 50%; + margin-top: -75px; + margin-left: -75px; + width: 150px; + height: 150px; + z-index: 99999; +} + +#play { + background-image: url(images/media/play.png); + opacity: 0; + display: none; +} + +#pause { + background-image: url(images/media/pause.png); + opacity: 0; + display: none; +} + +.fadeOut { + animation-name: fadeOut; + -webkit-animation-name: fadeOut; + animation-duration: .25s; + -webkit-animation-duration: .25s; + animation-timing-function: ease-in-out; + -webkit-animation-timing-function: ease-in-out; + visibility: visible !important; +} + +@keyframes fadeOut { + 0% { + transform: scale(.25); + opacity: 0.7; + } + + 60% { + transform: scale(.5); + opacity: 0.5; + } + + 80% { + transform: scale(.75); + opacity: 0.3; + } + + 100% { + transform: scale(1); + opacity: 0; + } +} + +@-webkit-keyframes fadeOut { + 0% { + -webkit-transform: scale(.25); + opacity: 0.7; + } + + 60% { + -webkit-transform: scale(.5); + opacity: 0.5; + } + + 80% { + -webkit-transform: scale(.75); + opacity: 0.3; + } + + 100% { + -webkit-transform: scale(1); + opacity: 0; + } +} + +.cursor-active { + cursor: default; +} + +.cursor-inactive { + cursor: none; +} \ No newline at end of file diff --git a/dashboard-ui/css/mediaplayer.css b/dashboard-ui/css/mediaplayer.css index 62a1f25e18..3ed4d78b89 100644 --- a/dashboard-ui/css/mediaplayer.css +++ b/dashboard-ui/css/mediaplayer.css @@ -1,36 +1,17 @@ /* Now playing bar */ .nowPlayingBar { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + padding: 6px 0 24px 0; + border-top: 2px solid green; } .nowPlayingBar .barBackground { - border-top: 2px solid #08b; + border-top: 2px solid green; position: absolute; + margin: -8px -0.5em -26px !important; width: 100%; height: 100%; } - #videoPlayer.fullscreenVideo .nowPlayingBar { - opacity: 0.5; - } - - #videoPlayer.fullscreenVideo .inactive { - -webkit-transition: top 0.6s ease-in-out; - -moz-transition: top 0.6s ease-in-out; - -o-transition: top 0.6s ease-in-out; - transition: top 0.6s ease-in-out; - top: 100%; - height: 100%; - } - - #videoPlayer.fullscreenVideo:hover .active { - top: 95% !important; - } - .nowPlayingBar > *:not(#mediaElement):not(.mediaFlyoutContainer):not(.barBackground ) { position: relative; } @@ -48,20 +29,6 @@ position: relative; } -.fullscreenVideo #mediaElement { - display: block; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -#mediaPlayer { - min-height: 50px; - padding-bottom: 20px; -} - .nowPlayingMediaInfo div { display: inline-block; } @@ -72,17 +39,15 @@ .nowPlayingMediaInfo { - position: relative; display: inline-block; - margin-top: 3px; - vertical-align: top; } .nowPlayingText { position: relative; - margin: 0 2em 0 5px; + top: -3px; + margin-left: 3px; + margin-right: 2em; font-weight: normal; - top: -7px; } @media all and (max-width: 650px) { @@ -95,100 +60,6 @@ height: 24px; } -.itemVideo { - z-index: 99998; - background: #000; - min-width: 241px; - max-width: 320px; - max-height: 181px; - margin: 20px; - position: fixed; - top: 50%; - left: 50%; - margin-left: -160px; - margin-top: -90px; -} - -.fullscreenVideo { - position: fixed; - top: 0 !important; - bottom: 0 !important; - right: 0 !important; - left: 0 !important; - width: 100%; - height: 100%; - border: 0; - z-index: 99996; - margin: 0 !important; -} - -#videoBackdrop { - z-index: 99990; - position: fixed; - background-color: transparent; - background-color: rgba(0, 0, 0, 0.6); - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -#videoPlayer { - z-index: 99997; - background: #1d1d1d; - position: fixed; - border: 1px solid #333; - top: 50%; - left: 50%; - margin-left: -170px; - margin-top: -115px; -} - -#videoPlayer.fullscreenVideo, -#videoPlayer.fullscreenVideo .itemVideo { - position: fixed !important; - top: 0 !important; - bottom: 0 !important; - right: 0 !important; - left: 0 !important; - width: 100% !important; - height: 100% !important; - border: 0 !important; - margin: 0 !important; - max-width: 100%; - max-height: 100%; -} - -.fullscreenVideo .itemVideo { - z-index: 99996; -} - - #videoPlayer .itemVideo { - position: static; - margin: 0; - margin: 20px 20px 60px; - } - - #videoPlayer .nowPlayingBar { - z-index: 99999; - padding: 0; - height: 50px; - background-color: #1d1d1d; - position: absolute; - top: auto; - right: 0; - bottom: 0; - left: 0; - } - - #videoPlayer .nowPlayingBar .barBackground { - border-width: 0; - } - - #videoPlayer.fullscreenVideo .nowPlayingBar .barBackground { - border-width: 2px; - } - .currentTime { display: inline-block; position: relative; @@ -208,7 +79,6 @@ .sliderContainer { display: inline-block; - margin-top: 10px; } .positionSliderContainer { @@ -227,10 +97,6 @@ margin-left: 15px !important; } -.highPosition .ui-slider-track { - z-index: 100000; -} - .volumeSliderContainer .ui-slider-track { margin-left: 5px !important; } @@ -262,40 +128,27 @@ input[type="range"]::-ms-fill-upper { display: none; /* display and visibility only */ } -@media all and (max-width: 1200px) { - .volumeSliderContainer, .sendMediaButton { - display: none!important; - } -} - -@media all and (max-width: 960px) { - .volumeSliderContainer, .audioTracksButton, .chaptersButton, .sendMediaButton { - display: none!important; - } -} - @media all and (max-width: 800px) { - .volumeButton, .volumeSliderContainer, .muteButton, .unmuteButton, .nowPlayingMediaInfo, .sendMediaButton { + .volumeButton, .volumeSliderContainer, .muteButton, .unmuteButton, .nowPlayingMediaInfo { display: none!important; } } -@media all and (max-width: 640px) { - .positionSliderContainer { - width: 80px; - } - - .chaptersButton, .audioTracksButton, .qualityButton, .subtitleButton { +@media all and (max-width: 600px) { + .chaptersButton, .audioTracksButton, .sendMediaButton { display: none!important; } - .positionSliderContainer { + .positionSliderContainer, .currentTime { top: 0!important; position: relative!important; } } @media all and (max-width: 500px) { + .positionSliderContainer { + width: 80px; + } .previousTrackButton, .nextTrackButton { display: none!important; @@ -319,31 +172,13 @@ input[type="range"]::-ms-fill-upper { border: 1px solid #999; position: absolute; z-index: 99999; - bottom: 64px; + bottom: 78px; margin-left: -50px; max-height: 300px; overflow-y: auto; font-size: 13px; } -.fullscreenVideo .mediaPlayerFlyout { - -webkit-transition: top 0.6s ease-in-out; - -moz-transition: top 0.6s ease-in-out; - -o-transition: top 0.6s ease-in-out; - transition: top 0.6s ease-in-out; - top: 100%; - bottom: 100%; -} - -#videoPlayer.fullscreenVideo:hover .mediaPlayerFlyout { - -webkit-transition: top 0.6s ease-out; - -moz-transition: top 0.6s ease-out; - -o-transition: top 0.6s ease-out; - transition: top 0.6s ease-out; - top: -303px !important; - bottom: -3px !important; -} - .chaptersFlyout { width: 250px; } @@ -412,166 +247,8 @@ input[type="range"]::-ms-fill-upper { padding-left: 5px; } -@media (min-width: 640px) and (min-height: 360px) { - .itemVideo:not(.fullscreenVideo) { - min-width: 361px; - max-width: 480px; - max-height: 271px; - margin-left: -240px; - margin-top: -135px; - } - - #videoPlayer { - margin-left: -250px; - margin-top: -160px; - } -} - -@media (min-width: 800px) and (min-height: 450px) { - .itemVideo:not(.fullscreenVideo) { - min-width: 481px; - max-width: 640px; - max-height: 362px; - margin-left: -320px; - margin-top: -181px; - } - - #videoPlayer { - margin-left: -330px; - margin-top: -205px; - } -} - -@media (min-width: 960px) and (min-height: 540px) { - .itemVideo:not(.fullscreenVideo) { - min-width: 541px; - max-width: 720px; - max-height: 406px; - margin-left: -360px; - margin-top: -203px; - } - - #videoPlayer { - margin-left: -370px; - margin-top: -228px; - } -} - -@media (min-width: 1200px) and (min-height: 720px) { - .itemVideo:not(.fullscreenVideo) { - min-width: 812px; - max-width: 1080px; - max-height: 610px; - margin-left: -540px; - margin-top: -305px; - } - - #videoPlayer { - margin-left: -550px; - margin-top: -329px; - } -} - -@media (min-width: 1440px) and (min-height: 720px) { - .itemVideo:not(.fullscreenVideo) { - min-width: 812px; - max-width: 1080px; - max-height: 610px; - margin-left: -540px; - margin-top: -305px; - } - - #videoPlayer { - margin-left: -550px; - margin-top: -329px; - } - +@media (min-width: 1440px) { .positionSliderContainer { width: 300px; } -} - -.status { - position: absolute; - top: 50%; - left: 50%; - margin-top: -75px; - margin-left: -75px; - width: 150px; - height: 150px; - z-index: 99999; -} - -#play { - background-image: url(images/media/play.png); - opacity: 0; - display: none; -} - -#pause { - background-image: url(images/media/pause.png); - opacity: 0; - display: none; -} - -.fadeOut { - animation-name: fadeOut; - -webkit-animation-name: fadeOut; - animation-duration: .25s; - -webkit-animation-duration: .25s; - animation-timing-function: ease-in-out; - -webkit-animation-timing-function: ease-in-out; - visibility: visible !important; -} - -@keyframes fadeOut { - 0% { - transform: scale(.25); - opacity: 0.7; - } - - 60% { - transform: scale(.5); - opacity: 0.5; - } - - 80% { - transform: scale(.75); - opacity: 0.3; - } - - 100% { - transform: scale(1); - opacity: 0; - } -} - -@-webkit-keyframes fadeOut { - 0% { - -webkit-transform: scale(.25); - opacity: 0.7; - } - - 60% { - -webkit-transform: scale(.5); - opacity: 0.5; - } - - 80% { - -webkit-transform: scale(.75); - opacity: 0.3; - } - - 100% { - -webkit-transform: scale(1); - opacity: 0; - } -} - -.cursor-active { - cursor: default; -} - -.cursor-inactive { - cursor: none; } \ No newline at end of file diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 0ded57d1c7..599d2aac92 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -18,12 +18,12 @@ var timeout; var video; var culturesPromise; + var initialVolume; var fullscreenExited = false; var idleState = true; self.initVideoPlayer = function () { video = playVideo(item, startPosition, user); - enhancePlayer(); return video; }; @@ -41,33 +41,10 @@ }; self.resetEnhancements = function () { - - var footer = $("#footer"); - - var mediaPlayer = $("#mediaPlayer", footer); - - var mediaElement = $("#mediaElement", mediaPlayer); - - var nowPlayingBar = $("#nowPlayingBar", mediaPlayer); - - footer.css("top", null); - - mediaElement.html(""); // remove play/pause - - mediaPlayer.hide().append(nowPlayingBar); // put elements back where they belong - - $("#videoBackdrop", footer).hide(); - - if (!$("#footerNotifications", footer).html()) { // only hide footer if no notifications - - footer.hide(); - - } - + $("#mediaPlayer").hide(); + $("video").remove(); $("html").css("cursor", "default"); - $(".ui-loader").hide(); - }; self.exitFullScreen = function() { @@ -90,7 +67,7 @@ self.showSubtitleMenu = function () { - var flyout = $('#subtitleFlyout'); + var flyout = $('#video-subtitleFlyout'); if (!flyout.is(':visible')) { @@ -101,39 +78,39 @@ culturesPromise.done(function (cultures) { $("html").css("cursor", "default"); flyout.html(getSubtitleTracksHtml(currentItem, cultures)).trigger('create').scrollTop(0); - toggleFlyout(flyout, '#subtitleButton'); + toggleFlyout(flyout, '#video-subtitleButton'); }); } else { - toggleFlyout(flyout, '#subtitleButton'); + toggleFlyout(flyout, '#video-subtitleButton'); } }; self.showQualityFlyout = function () { - var flyout = $('#qualityFlyout'); + var flyout = $('#video-qualityFlyout'); if (!flyout.is(':visible')) { flyout.html(getQualityFlyoutHtml(currentItem)).scrollTop(0); } - toggleFlyout(flyout, '#qualityButton'); + toggleFlyout(flyout, '#video-qualityButton'); }; self.showChaptersFlyout = function () { - var flyout = $('#chaptersFlyout'); + var flyout = $('#video-chaptersFlyout'); if (!flyout.is(':visible')) { flyout.html(getChaptersFlyoutHtml(currentItem)).scrollTop(0); } - toggleFlyout(flyout, '#chaptersButton'); + toggleFlyout(flyout, '#video-chaptersButton'); }; self.showAudioTracksFlyout = function () { - var flyout = $('#audioTracksFlyout'); + var flyout = $('#video-audioTracksFlyout'); if (!flyout.is(':visible')) { @@ -144,15 +121,15 @@ culturesPromise.done(function (cultures) { $("html").css("cursor", "default"); flyout.html(getAudioTracksHtml(currentItem, cultures)).trigger('create').scrollTop(0); - toggleFlyout(flyout, '#audioTracksButton'); + toggleFlyout(flyout, '#video-audioTracksButton'); }); } else { - toggleFlyout(flyout, '#audioTracksButton'); + toggleFlyout(flyout, '#video-audioTracksButton'); } }; $(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function () { - var nowPlayingBar = $('#nowPlayingBar'); + var videoControls = $('#videoControls'); $('.itemVideo').off('mousemove keydown scroll', idleHandler); @@ -161,22 +138,22 @@ idleState = true; $('.itemVideo').on('mousemove keydown scroll', idleHandler).trigger('mousemove'); } else { - nowPlayingBar.removeClass("highPosition"); + videoControls.removeClass("active inactive"); exitFullScreenToWindow(); } }); $(function () { - $('#chaptersFlyout').on('click', '.mediaFlyoutOption', function () { + $('#video-chaptersFlyout').on('click', '.mediaFlyoutOption', function () { var ticks = parseInt(this.getAttribute('data-positionticks')); self.changeStream(ticks); - hideFlyout($('#chaptersFlyout')); + hideFlyout($('#video-chaptersFlyout')); }); - $('#audioTracksFlyout').on('click', '.mediaFlyoutOption', function () { + $('#video-audioTracksFlyout').on('click', '.mediaFlyoutOption', function () { if (!$(this).hasClass('selectedMediaFlyoutOption')) { var index = parseInt(this.getAttribute('data-index')); @@ -184,10 +161,10 @@ self.changeStream(self.getCurrentTicks(), { AudioStreamIndex: index }); } - hideFlyout($('#audioTracksFlyout')); + hideFlyout($('#video-audioTracksFlyout')); }); - $('#subtitleFlyout').on('click', '.mediaFlyoutOption', function () { + $('#video-subtitleFlyout').on('click', '.mediaFlyoutOption', function () { if (!$(this).hasClass('selectedMediaFlyoutOption')) { var index = parseInt(this.getAttribute('data-index')); @@ -195,10 +172,10 @@ self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: index }); } - hideFlyout($('#subtitleFlyout')); + hideFlyout($('#video-subtitleFlyout')); }); - $('#qualityFlyout').on('click', '.mediaFlyoutOption', function () { + $('#video-qualityFlyout').on('click', '.mediaFlyoutOption', function () { if (!$(this).hasClass('selectedMediaFlyoutOption')) { @@ -214,10 +191,10 @@ }); } - hideFlyout($('#qualityFlyout')); + hideFlyout($('#video-qualityFlyout')); }); - $("#footer").on("mousemove", "#videoPlayer.fullscreenVideo #itemVideo", function () { + $("body").on("mousemove", "#videoPlayer.fullscreenVideo #itemVideo", function () { idleHandler(this); @@ -226,7 +203,7 @@ function idleHandler() { var video = $(".itemVideo"); - var nowPlayingBar = $("#nowPlayingBar"); + var videoControls = $("#videoControls"); if (timeout) { window.clearTimeout(timeout); @@ -234,7 +211,7 @@ if (idleState == true) { video.removeClass("cursor-inactive").addClass("cursor-active"); - nowPlayingBar.removeClass("inactive").addClass("active"); + videoControls.removeClass("inactive").addClass("active"); } idleState = false; @@ -242,9 +219,9 @@ timeout = window.setTimeout(function () { idleState = true; video.removeClass("cursor-active").addClass("cursor-inactive"); - nowPlayingBar.removeClass("active").addClass("inactive"); + videoControls.removeClass("active").addClass("inactive"); }, 4000); - } + }; function requestFullScreen(element) { // Supports most browsers and their versions. @@ -255,118 +232,6 @@ } else { enterFullScreen(); } - } - - function enhancePlayer() { - // Show loading animation - $(".ui-loader").show(); - $("html").css("cursor", "wait"); - - var footer = $("#footer"); - var nowPlayingBar = $("#nowPlayingBar", footer); - var mediaElement = $("#mediaElement", footer); - - var play = $("
"); - var pause = $(""); - - mediaElement.append(play).append(pause); - - $("#videoBackdrop", footer).show(); - - footer.css("top", "101%"); - - var videoPlayer = $("#videoPlayer", footer) - .append(nowPlayingBar); - - // Stop playback on browser back button nav - $(window).on("popstate", function () { - - self.stop(); - - return; - - }); - - $(video) - .on("click", function (e) { - - if (this.paused) { - - self.unpause(); - - } else { - - self.pause(); - - } - - }) - .on("dblclick", function () { - - self.toggleFullscreen(); - - }) - .on("seeking", function (e) { - - $("html").css("cursor", "wait"); - - }) - .on("seeked", function (e) { - - $("html").css("cursor", "default"); - - }) - .on("loadstart", function () { - - $("html").css("cursor", "progress"); - - }) - .on("canplay", function () { - - $(".ui-loader").hide(); - - $("html").css("cursor", "default"); - - }); - - $(".mediaFlyoutContainer").on("click", "a", function (e) { - - if (confirm("This option will close the video player. Proceed?")) { - - self.stop(); - - } else { - - e.preventDefault(); - - } - - }); - - changeHandler("fullscreenchange"); - changeHandler("mozfullscreenchange"); - changeHandler("webkitfullscreenchange"); - changeHandler("msfullscreenchange"); - - $(document).on("keyup.enhancePlayer", function (e) { - if (fullscreenExited) { - - videoPlayer.removeClass("fullscreenVideo"); - - fullscreenExited = false; - - return; - } - - if (e.keyCode == 27) { - - self.stop(); - - $(this).unbind("keyup.enhancePlayer"); - } - }); - - fullscreenExited = false; }; function changeHandler(event) { @@ -375,7 +240,7 @@ fullscreenExited = self.isFullScreen() == false; }); - } + }; function enterFullScreen() { @@ -391,7 +256,7 @@ player.removeClass("fullscreenVideo"); - } + }; function toggleFlyout(flyout, button) { @@ -421,14 +286,14 @@ hideFlyout(flyout); } - } + }; function hideFlyout(flyout) { flyout.slideUp().empty(); $(document.body).off("mousedown.hidesearchhints"); - } + }; function getChaptersFlyoutHtml(item) { @@ -487,7 +352,7 @@ } return html; - } + }; function getAudioTracksHtml(item, cultures) { @@ -570,7 +435,7 @@ html += ''; return html; - } + }; function getSubtitleTracksHtml(item, cultures) { @@ -657,7 +522,7 @@ html += ''; return html; - } + }; function getQualityFlyoutHtml(item) { @@ -698,7 +563,7 @@ } return html; - } + }; function getInitialSubtitleStreamIndex(mediaStreams, user) { @@ -737,7 +602,7 @@ } return null; - } + }; function getInitialAudioStreamIndex(mediaStreams, user) { @@ -760,7 +625,7 @@ // Just use the first audio stream return audioStreams.length ? audioStreams[0].Index : null; - } + }; function getVideoQualityOptions(item) { @@ -836,7 +701,7 @@ options[selectedIndex].selected = true; return options; - } + }; function playVideo(item, startPosition, user) { @@ -909,6 +774,13 @@ })) + seekParam; + //======================================================================================> + + // Show loading animation + $(".ui-loader").show(); + $("html").css("cursor", "wait"); + + // Create video player var html = ''; var requiresControls = $.browser.msie || $.browser.android || ($.browser.webkit && !$.browser.chrome); @@ -937,52 +809,54 @@ html += '