diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 85bad26b6b..5aa3524a9c 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -619,21 +619,21 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { display: none; } -.libraryPage ::-webkit-scrollbar { +.darkScrollbars ::-webkit-scrollbar { width: 12px; height: 12px; } -.libraryPage ::-webkit-scrollbar-button:start:decrement, -.libraryPage ::-webkit-scrollbar-button:end:increment { +.darkScrollbars ::-webkit-scrollbar-button:start:decrement, +.darkScrollbars ::-webkit-scrollbar-button:end:increment { display: none; } -.libraryPage ::-webkit-scrollbar-track-piece { +.darkScrollbars ::-webkit-scrollbar-track-piece { background-color: #3b3b3b; } -.libraryPage ::-webkit-scrollbar-thumb:vertical, .libraryPage ::-webkit-scrollbar-thumb:horizontal { +.darkScrollbars ::-webkit-scrollbar-thumb:vertical, .darkScrollbars ::-webkit-scrollbar-thumb:horizontal { -webkit-border-radius: 2px; background: #888 no-repeat center; } diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index f38e0e8308..afe5a99e28 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -74,9 +74,8 @@ } .nowPlayingInfo { - text-align: center; - padding: 1em 1em 0 1em; - + text-align: center; + padding: 1em 1em 2em 1em; } #videoPlayer .nowPlayingImage img { @@ -85,6 +84,56 @@ max-height: 200px; } +#videoPlayer .nowPlayingTabs { + margin: 0 0 0 1em; + overflow: hidden; + white-space: normal; + text-overflow: ellipsis; + text-align: left; + vertical-align: top; + color: #eee; + display: inline-block; + width: 80%; + font-weight: normal; + font-size: 15px; +} + +@media all and (max-width: 1200px) { + #videoPlayer .nowPlayingTabs { + font-size: 13px; + } +} + +.nowPlayingTabButtons { + margin-bottom: 1.25em; +} + +.nowPlayingTabButton { + display: inline-block; + font-size: 18px; + text-transform: uppercase; + color: #ddd !important; + font-weight: 500 !important; + text-decoration: none; +} + + .nowPlayingTabButton + .nowPlayingTabButton { + padding-left: 1.5em; + } + + .nowPlayingTabButton:not(.selectedNowPlayingTabButton):hover { + color: white !important; + } + +.selectedNowPlayingTabButton { + color: #2ad !important; +} + +.nowPlayingTab { + overflow-y: hidden; + overflow-x: auto; +} + #videoPlayer .nowPlayingText { font-weight: normal; margin: 0 0 0 1em; @@ -96,7 +145,6 @@ vertical-align: top; position: static; color: #eee; - max-width: 80%; } .videoNowPlayingName { @@ -173,10 +221,10 @@ } } -@media all and (max-width: 1000px), all and (max-height: 600px) { +@media all and (max-width: 800px), all and (max-height: 600px) { - #mediaPlayer .nowPlayingImage, #mediaPlayer .nowPlayingText { - display: none; + #mediaPlayer .nowPlayingInfo { + display: none !important; } } @@ -197,10 +245,14 @@ } @media all and (min-width: 1300px) { + .nowPlayingInfo { + padding-bottom: 0; + } + #videoPlayer .nowPlayingImage img { height: auto !important; max-width: 400px; - max-height: 250px; + max-height: 280px; } } diff --git a/dashboard-ui/css/tileitem.css b/dashboard-ui/css/tileitem.css index d8cd0a49ab..f2b54d72b6 100644 --- a/dashboard-ui/css/tileitem.css +++ b/dashboard-ui/css/tileitem.css @@ -1,5 +1,5 @@ .tileItem { - background: #1e1e1e; + background: rgba(30, 30, 30, .7); padding: 10px 7px 5px; margin: 3px 0; font-weight: normal !important; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index af2bfc65c3..b58187b362 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1405,10 +1405,6 @@ var cssClass = "card"; - if (options.transparent !== false) { - cssClass += " transparentCard"; - } - cssClass += ' ' + options.shape + 'Card'; var mediaSourceCount = item.MediaSourceCount || 1; diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 7d2493ea42..dda658701c 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -291,7 +291,7 @@ var url = ""; var imageWidth = 400; - var imageHeight = 250; + var imageHeight = 280; if (state.NowPlayingItem.PrimaryImageTag) { @@ -328,9 +328,6 @@ }); } - var nowPlayingTextElement = $('.nowPlayingText', mediaControls); - var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem, false); - if (url) { $('.nowPlayingImage', mediaControls).html(''); } else { @@ -350,6 +347,44 @@ $('.videoTopControlsLogo', mediaControls).html(''); } + var elem = $('.nowPlayingTabs', mediaControls).html(getNowPlayingTabsHtml(item)).lazyChildren(); + + $('.nowPlayingTabButton', elem).on('click', function () { + + if (!$(this).hasClass('selectedNowPlayingTabButton')) { + $('.selectedNowPlayingTabButton').removeClass('selectedNowPlayingTabButton'); + $(this).addClass('selectedNowPlayingTabButton'); + $('.nowPlayingTab').hide(); + $('.' + this.getAttribute('data-tab')).show('slide').trigger('scroll'); + } + }); + + $('.chapterCard', elem).on('click', function () { + + self.seek(parseInt(this.getAttribute('data-position'))); + }); + }; + + function getNowPlayingTabsHtml(item) { + + var html = ''; + + html += '
'; + + html += '' + Globalize.translate('TabInfo') + ''; + + if (item.Chapters && item.Chapters.length) { + html += '' + Globalize.translate('TabScenes') + ''; + } + + if (item.People && item.People.length) { + html += '' + Globalize.translate('TabCast') + ''; + } + + html += '
'; + + html += '
'; + var nameHtml = MediaController.getNowPlayingNameHtml(item, false); nameHtml = '
' + nameHtml + '
'; var miscInfo = LibraryBrowser.getMiscInfoHtml(item); @@ -369,8 +404,113 @@ nameHtml += '
' + item.Overview + '
'; } - nowPlayingTextElement.html(nameHtml); - }; + html += nameHtml; + html += '
'; + + if (item.Chapters && item.Chapters.length) { + html += ''; + } + + if (item.People && item.People.length) { + html += ''; + } + + return html; + } function onPositionSliderChange() { @@ -520,7 +660,7 @@ idleState = true; $('.hiddenOnIdle').addClass("inactive"); $('#videoPlayer').addClass('idlePlayer'); - }, 4000); + }, 5000); } function updateVolumeButtons(vol) { @@ -905,7 +1045,7 @@ }); if (hideElementsOnIdle) { - $(document.body).on("mousemove.videplayer", "#itemVideo", function () { + $(document.body).on("mousemove.videoplayer", function () { idleHandler(this); }); @@ -919,7 +1059,7 @@ // Stop playback on browser back button nav $(window).off("popstate.videoplayer"); - $(document.body).off("mousemove.videplayer"); + $(document.body).off("mousemove.videoplayer"); $('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer'); } @@ -930,7 +1070,7 @@ return true; } - if ($.browser.msie || $.browser.mobile) { + if ($.browser.mobile) { return false; } @@ -1092,7 +1232,14 @@ volumeSlider.val(initialVolume).slider('refresh'); updateVolumeButtons(initialVolume); - video.one("playing.mediaplayerevent", function (e) { + video.one("loadedmetadata.mediaplayerevent", function (e) { + + // The IE video player won't autoplay without this + if ($.browser.msie) { + this.play(); + } + + }).one("playing.mediaplayerevent", function (e) { // TODO: This is not working in chrome. Is it too early? diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index a4ad6a2127..c906e1638d 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -467,7 +467,14 @@ clearProgressInterval(); - $(element).off('ended.playbackstopped').off('ended.playnext').one("play", function () { + $(element).off('ended.playbackstopped').off('ended.playnext').one("loadedmetadata.mediaplayerevent", function (e) { + + // The IE video player won't autoplay without this + if ($.browser.msie && self.currentItem.MediaType == "Video") { + this.play(); + } + + }).one("play", function () { self.updateCanClientSeek(this); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 493559bed5..a76750dcb4 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1691,7 +1691,7 @@ var AppInfo = {}; videoPlayerHtml += '
'; videoPlayerHtml += '
'; - videoPlayerHtml += '
'; + videoPlayerHtml += '
'; videoPlayerHtml += '
'; // nowPlayingInfo videoPlayerHtml += ''; @@ -1801,22 +1801,27 @@ $(document).on('pagecreate', ".page", function () { var page = $(this); var current = page.data('theme'); - if (current) { - return; + if (!current) { + + var newTheme; + + if (page.hasClass('libraryPage')) { + newTheme = 'b'; + } else { + newTheme = 'a'; + } + + current = page.page("option", "theme"); + + if (current && current != newTheme) { + page.page("option", "theme", newTheme); + } } - var newTheme; - - if (page.hasClass('libraryPage')) { - newTheme = 'b'; + if (current == 'b') { + $(document.body).addClass('darkScrollbars'); } else { - newTheme = 'a'; - } - - current = page.page("option", "theme"); - - if (current && current != newTheme) { - page.page("option", "theme", newTheme); + $(document.body).addClass('removeScrollbars'); } }).on('pagebeforeshow', ".page", function () {