diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 6c5e0f96be..5500913ecb 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -251,7 +251,7 @@ logger.log("Reconnect attempt failed to " + url); - if (currentRetryCount <= 5) { + if (currentRetryCount < 5) { var newConnectionMode = switchConnectionMode(connectionMode); diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index 8fefd279e7..7b7b60dc6c 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -322,7 +322,7 @@ function saveUserInfoIntoCredentials(server, user) { - var info = new { + var info = { Id: user.Id, IsSignedInOffline: true } diff --git a/dashboard-ui/cordova/android/localassetmanager.js b/dashboard-ui/cordova/android/localassetmanager.js index 043f660837..01820a5a2d 100644 --- a/dashboard-ui/cordova/android/localassetmanager.js +++ b/dashboard-ui/cordova/android/localassetmanager.js @@ -10,6 +10,12 @@ return null; } + function saveOfflineUser(user) { + var deferred = DeferredBuilder.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + function getCameraPhotos() { var deferred = DeferredBuilder.Deferred(); deferred.resolveWith(null, [[]]); diff --git a/dashboard-ui/cordova/android/vlcplayer.js b/dashboard-ui/cordova/android/vlcplayer.js index a40498b92b..1864f26c12 100644 --- a/dashboard-ui/cordova/android/vlcplayer.js +++ b/dashboard-ui/cordova/android/vlcplayer.js @@ -92,39 +92,39 @@ function getPlaybackStartInfoForVideoActivity(videoUrl, mediaSource, item) { - var state = { - PlayState: {} + var playbackStartInfo = { + QueueableMediaTypes: item.MediaType, + ItemId: item.Id, + NowPlayingItem: {}, + MediaSourceId: mediaSource.Id }; + if (mediaSource.RunTimeTicks) { + playbackStartInfo.NowPlayingItem.RunTimeTicks = mediaSource.RunTimeTicks; + } + var audioStreamIndex = getParameterByName('AudioStreamIndex', videoUrl); if (audioStreamIndex) { - state.PlayState.AudioStreamIndex = parseInt(audioStreamIndex); + playbackStartInfo.AudioStreamIndex = parseInt(audioStreamIndex); + } + if (self.currentSubtitleStreamIndex != null) { + playbackStartInfo.SubtitleStreamIndex = self.currentSubtitleStreamIndex; } - state.PlayState.SubtitleStreamIndex = self.currentSubtitleStreamIndex; - state.PlayState.PlayMethod = getParameterByName('static', videoUrl) == 'true' ? + playbackStartInfo.PlayMethod = getParameterByName('static', videoUrl) == 'true' ? 'DirectStream' : 'Transcode'; - state.PlayState.LiveStreamId = getParameterByName('LiveStreamId', videoUrl); - state.PlayState.PlaySessionId = getParameterByName('PlaySessionId', videoUrl); + playbackStartInfo.LiveStreamId = getParameterByName('LiveStreamId', videoUrl); + playbackStartInfo.PlaySessionId = getParameterByName('PlaySessionId', videoUrl); - state.PlayState.MediaSourceId = mediaSource.Id; + // Seeing some deserialization errors around this property + if (mediaSource.RunTimeTicks && mediaSource.RunTimeTicks > 0) { + playbackStartInfo.CanSeek = true; + } - state.NowPlayingItem = { - RunTimeTicks: mediaSource.RunTimeTicks - }; - - state.PlayState.CanSeek = mediaSource.RunTimeTicks && mediaSource.RunTimeTicks > 0; - - var playbackStartInfo = { - QueueableMediaTypes: item.MediaType, - ItemId: item.Id, - NowPlayingItem: state.NowPlayingItem - }; - - return $.extend(playbackStartInfo, state.PlayState); + return playbackStartInfo; } self.setCurrentSrc = function (val, item, mediaSource, tracks) { diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index 57bdaef4fb..8207fab80c 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -211,10 +211,6 @@ max-height: 100%; } - /* Hack for safari because it doesn't allow clickable content over the video surface. */ - /*.itemVideo { (;top: 9%!important;height: 91% !important;); } -.itemVideo { [;top: 9%!important;height: 91% !important;]; }*/ - #videoPlayer .inactive { display: none !important; } diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index c75c03dc5b..f8468573ed 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -15,7 +15,7 @@