diff --git a/dashboard-ui/css/icons.css b/dashboard-ui/css/icons.css index 10d1cc35f2..c2fd9d62c2 100644 --- a/dashboard-ui/css/icons.css +++ b/dashboard-ui/css/icons.css @@ -78,4 +78,18 @@ /* Fallback */ .ui-nosvg .ui-icon-filter:after { background-image: url("images/icons/filter.png"); +} +.ui-icon-audiocd:after { + background-image: url("images/icons/audiocd.png"); +} +/* Fallback */ +.ui-nosvg .ui-icon-audiocd:after { + background-image: url("images/icons/audiocd.png"); +} +.ui-icon-subtitles:after { + background-image: url("images/icons/subtitles.png"); +} +/* Fallback */ +.ui-nosvg .ui-icon-subtitles:after { + background-image: url("images/icons/subtitles.png"); } \ No newline at end of file diff --git a/dashboard-ui/css/images/icons/audiocd.png b/dashboard-ui/css/images/icons/audiocd.png new file mode 100644 index 0000000000..81a411484b Binary files /dev/null and b/dashboard-ui/css/images/icons/audiocd.png differ diff --git a/dashboard-ui/css/images/icons/subtitles.png b/dashboard-ui/css/images/icons/subtitles.png new file mode 100644 index 0000000000..a9ddfa2032 Binary files /dev/null and b/dashboard-ui/css/images/icons/subtitles.png differ diff --git a/dashboard-ui/css/mediaplayer.css b/dashboard-ui/css/mediaplayer.css index 62c55dcfce..e585787692 100644 --- a/dashboard-ui/css/mediaplayer.css +++ b/dashboard-ui/css/mediaplayer.css @@ -1,45 +1,41 @@  /* Now playing bar */ -#nowPlayingBar { - padding: 6px .5em; +.nowPlayingBar { + padding: 6px 0 12px 0; border-top: 2px solid green; } - #nowPlayingBar .highPosition { + .nowPlayingBar .highPosition { z-index: 99999; position: relative; opacity: 0.5; } - #nowPlayingBar .highPosition:hover:not(.barBackground ) { + .nowPlayingBar .highPosition:hover:not(.barBackground ) { opacity: 0.9; } - #nowPlayingBar .barBackground { + .nowPlayingBar .barBackground { border-top: 2px solid green; - background: #3c3c3c; position: absolute; margin: -8px -0.5em !important; width: 100%; height: 100%; } - #nowPlayingBar > *:not(#mediaElement):not(.mediaFlyoutContainer):not(.barBackground ) { - margin: 0 1em; + .nowPlayingBar > *:not(#mediaElement):not(.mediaFlyoutContainer):not(.barBackground ) { position: relative; } .nowPlayingBarImage { - border: 1px solid #a7a7a7!important; + border: 1px solid #444!important; padding: 1px; vertical-align: bottom; } .mediaButton { - display: inline-block; - position: relative; - top: -4px; + vertical-align: top; } #mediaElement { @@ -64,6 +60,7 @@ position: relative; top: -3px; margin-left: 3px; + margin-right: 2em; } @media all and (min-width: 650px) { @@ -103,8 +100,8 @@ display: inline-block; position: relative; top: -10px; - width: 110px; - margin-right: .25em; + max-width: 110px; + margin-right: 2em; } .mediaSlider { @@ -114,37 +111,31 @@ cursor: pointer; } -@media screen and (-webkit-min-device-pixel-ratio:0) { - /* IE10 won't see this (good) '*/ - .mediaSlider { - -webkit-appearance: none; - -moz-apperance: none; - background: #777; - border-radius: 5px; - vertical-align: bottom; - height: 3px; - top: -17px; - } +.sliderContainer { + display: inline-block; } - -.mediaSlider::-webkit-slider-thumb { - -webkit-appearance: none; - -moz-apperance: none; - width: 15px; - height: 15px; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - -o-border-radius: 10px; - border-radius: 10px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fefefe), color-stop(0.49, #dddddd), color-stop(0.51, #d1d1d1), color-stop(1, #a1a1a1) ); -} - -.positionSlider { +.positionSliderContainer { width: 130px; } +.volumeSliderContainer { + width: 90px; +} + +.sliderContainer .ui-slider { + margin: 0 !important; +} + +.sliderContainer .ui-slider-track { + margin-left: 15px !important; + z-index: 100000; +} + +.volumeSliderContainer .ui-slider-track { + margin-left: 5px !important; +} + .volumeButton { margin-right: .5em!important; } @@ -173,15 +164,11 @@ input[type="range"]::-ms-fill-upper { } @media all and (max-width: 600px) { - .volumeButton, .volumeSlider, .nowPlayingText, .chaptersButton, .audioTracksButton { + .volumeButton, .volumeSliderContainer, .nowPlayingText, .chaptersButton, .audioTracksButton { display: none!important; } - #nowPlayingBar > *:not(#mediaElement):not(.mediaFlyoutContainer):not(.barBackground ) { - margin: 0 .5em; - } - - .positionSlider { + .positionSliderContainer { width: 50px; } @@ -191,7 +178,7 @@ input[type="range"]::-ms-fill-upper { } @media all and (max-width: 750px) { - .positionSlider { + .positionSliderContainer { width: 50px; } } @@ -296,7 +283,7 @@ input[type="range"]::-ms-fill-upper { width: 400px; } - .positionSlider { + .positionSliderContainer { width: 400px; } @@ -310,7 +297,7 @@ input[type="range"]::-ms-fill-upper { width: 500px; } - .positionSlider { + .positionSliderContainer { width: 500px; } @@ -324,11 +311,11 @@ input[type="range"]::-ms-fill-upper { width: 550px; } - .positionSlider { + .positionSliderContainer { width: 550px; } .itemVideo { left: -710px; } -} +} \ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 26cf340b98..fc2f7d31a5 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -669,7 +669,6 @@ h1 .imageLink { /* Footer */ #footer { - background: #3c3c3c; position: fixed; bottom: -2px; left: -2px; diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 364fb516a9..c619a63e34 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -42,11 +42,11 @@ $(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function () { var nowPlayingBar = ('#nowPlayingBar'); - $('.itemVideo').unbind('mousemove keydown scroll', idleHandler); + $('.itemVideo').off('mousemove keydown scroll', idleHandler); if (isFullScreen()) { $('.itemVideo').addClass('fullscreenVideo'); idleState = true; - $('.itemVideo').bind('mousemove keydown scroll', idleHandler).trigger('mousemove'); + $('.itemVideo').on('mousemove keydown scroll', idleHandler).trigger('mousemove'); } else { $(".mediaButton,.currentTime,.nowPlayingMediaInfo,.mediaSlider,.barBackground", nowPlayingBar).removeClass("highPosition"); $('.itemVideo').removeClass('fullscreenVideo'); @@ -216,46 +216,20 @@ currentTimeElement = $('.currentTime'); - volumeSlider = $('.volumeSlider').on('change', function () { + volumeSlider = $('.volumeSlider').on('slidestop', function () { + document.title += '1'; var vol = this.value; + updateVolumeButtons(vol); currentMediaElement.volume = vol; }); - $(".jqueryuislider").slider({ orientation: "horizontal" }); - - positionSlider = $(".positionSlider").on('mousedown', function () { + positionSlider = $(".positionSlider").on('slidestart', function () { isPositionSliderActive = true; - }); - - if ($.browser.mozilla) { - - positionSlider.on('change', onPositionSliderChange); - - } else { - - positionSlider.on('change', function () { - - isPositionSliderActive = true; - - setCurrentTimePercent(parseInt(this.value), currentItem); - - }).on('changed', onPositionSliderChange); - } - - - (function (el, timeout) { - var timer, trig = function () { el.trigger("changed"); }; - el.bind("change", function () { - if (timer) { - clearTimeout(timer); - } - timer = setTimeout(trig, timeout); - }); - })(positionSlider, 500); + }).on('slidestop', onPositionSliderChange); $('#chaptersFlyout').on('click', '.mediaFlyoutOption', function () { @@ -311,12 +285,6 @@ return d >= 0 && text.lastIndexOf(pattern) === d; } - function setCurrentTimePercent(percent, item) { - - var position = (percent / 100) * curentDurationTicks; - setCurrentTime(position, item, false); - } - function setCurrentTime(ticks, item, updateSlider) { // Convert to ticks @@ -332,12 +300,10 @@ var percent = ticks / curentDurationTicks; percent *= 100; - positionSlider.val(percent); - - positionSlider.removeAttr('disabled'); + positionSlider.val(percent).slider('enable').slider('refresh'); } } else { - positionSlider.attr('disabled', 'disabled'); + positionSlider.slider('disable'); } currentTimeElement.html(timeText); @@ -424,7 +390,7 @@ this.volume = initialVolume; }); - volumeSlider.val(initialVolume); + volumeSlider.val(initialVolume).slider('refresh'); updateVolumeButtons(initialVolume); audioElement.on("volumechange", function () { @@ -481,7 +447,7 @@ var screenWidth = Math.max(screen.height, screen.width); var mediaStreams = item.MediaStreams || []; - + var baseParams = { audioChannels: 2, audioBitrate: 128000, @@ -612,7 +578,7 @@ this.volume = initialVolume; }); - volumeSlider.val(initialVolume); + volumeSlider.val(initialVolume).slider('refresh'); updateVolumeButtons(initialVolume); videoElement.on("volumechange", function () { @@ -983,16 +949,16 @@ self.playById = function (id, itemType, startPositionTicks) { if (itemType == "Recording") { - + ApiClient.getLiveTvRecording(id, Dashboard.getCurrentUserId()).done(function (item) { self.play([item], startPositionTicks); }); - + return; } - + if (itemType == "Channel") { ApiClient.getLiveTvChannel(id, Dashboard.getCurrentUserId()).done(function (item) { @@ -1322,7 +1288,7 @@ if (currentMediaElement) { currentMediaElement.volume = Math.max(currentMediaElement.volume - .02, 0); - volumeSlider.val(currentMediaElement.volume); + volumeSlider.val(currentMediaElement.volume).slider('refresh'); } }; @@ -1331,7 +1297,7 @@ if (currentMediaElement) { currentMediaElement.volume = Math.min(currentMediaElement.volume + .02, 1); - volumeSlider.val(currentMediaElement.volume); + volumeSlider.val(currentMediaElement.volume).slider('refresh'); } }; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c94d7ca199..0cae9ff11b 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1269,37 +1269,45 @@ $(ApiClient).on("websocketmessage", Dashboard.onWebSocketMessageReceived); $(function () { - var footerHtml = '