diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index 6606cd7045..bf80defe8f 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -148,7 +148,7 @@ } .videoNowPlayingName { - font-size: 22px; + font-size: 18px; } .videoNowPlayingOverview, .videoNowPlayingRating { @@ -221,7 +221,7 @@ } } -@media all and (max-width: 800px), all and (max-height: 600px) { +@media all and (max-width: 1400px), all and (max-height: 800px) { #mediaPlayer .nowPlayingInfo { display: none !important; @@ -252,7 +252,7 @@ #videoPlayer .nowPlayingImage img { height: auto !important; max-width: 400px; - max-height: 280px; + max-height: 240px; } } diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index 8c516fbed8..5dbcd0b6cc 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -135,6 +135,8 @@ .on('play', onPlay) .on('pause', onPause) .on('playing', onPlaying) + .on('click', onClick) + .on('dblclick', onDblClick) .on('error', onError)[0]; } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index bb5c0f567f..8e77d4481e 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -395,7 +395,7 @@ var chapterIndex = 0; html += item.Chapters.map(function (c) { - var width = 320; + var width = 240; var chapterHtml = ''; chapterHtml += '
'; chapterHtml += '
'; diff --git a/dashboard-ui/thirdparty/cordova/android/mediasession.js b/dashboard-ui/thirdparty/cordova/android/mediasession.js index d98bdaa458..dba26cfc6f 100644 --- a/dashboard-ui/thirdparty/cordova/android/mediasession.js +++ b/dashboard-ui/thirdparty/cordova/android/mediasession.js @@ -4,6 +4,7 @@ var currentPlayer; var lastPlayerState; + var lastUpdateTime; function updatePlayerState(state, eventName) { @@ -29,6 +30,7 @@ var album = state.NowPlayingItem.Album || ''; var duration = state.NowPlayingItem.RunTimeTicks ? (state.NowPlayingItem.RunTimeTicks / 10000000) : 0; var position = playState.PositionTicks ? (playState.PositionTicks / 10000000) : 0; + var itemId = state.NowPlayingItem.Id; var isPaused = playState.IsPaused || false; var canSeek = playState.CanSeek || false; @@ -64,7 +66,16 @@ } - MainActivity.updateMediaSession(eventName, title, artist, album, parseInt(duration), parseInt(position), url, canSeek, isPaused); + // Don't go crazy reporting position changes + if (eventName == 'positionchange') { + var time = new Date().getTime(); + if ((time - lastUpdateTime) < 500) { + return; + } + } + + MainActivity.updateMediaSession(eventName, itemId, title, artist, album, parseInt(duration), parseInt(position), url, canSeek, isPaused); + lastUpdateTime = new Date().getTime(); } function onStateChanged(e, state) {