';
diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js
index 7801e23a08..045f5b2a88 100644
--- a/dashboard-ui/scripts/librarymenu.js
+++ b/dashboard-ui/scripts/librarymenu.js
@@ -1,11 +1,14 @@
(function (window, document, $, devicePixelRatio) {
+ var backStack = [];
+ var addNextToBackStack = true;
+
function renderHeader() {
var html = '';
- $('.downloadLanguages', page).html(html).trigger("create");
+ $('.downloadLanguages', page).html(html).trigger('create');
var langs = config.DownloadLanguages || [];
diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js
index 35eb398916..9c68a1a504 100644
--- a/dashboard-ui/scripts/nowplayingbar.js
+++ b/dashboard-ui/scripts/nowplayingbar.js
@@ -22,13 +22,15 @@
var html = '';
- html += '
';
+ // add return false because on iOS clicking the bar often ends up clicking the content underneath.
+ html += '
';
html += '
';
html += '
';
- html += '
';
- html += '
';
+ // The onclicks are needed due to the return false above
+ html += '
';
+ html += '
';
html += '
';
diff --git a/dashboard-ui/scripts/search.js b/dashboard-ui/scripts/search.js
index 16591f4013..a6a12288b2 100644
--- a/dashboard-ui/scripts/search.js
+++ b/dashboard-ui/scripts/search.js
@@ -97,14 +97,17 @@
function requestSearchHintsForOverlay(elem, searchTerm) {
var currentTimeout = searchHintTimeout;
+ Dashboard.showLoadingMsg();
ApiClient.getSearchHints({ userId: Dashboard.getCurrentUserId(), searchTerm: searchTerm, limit: 30 }).done(function (result) {
- if (currentTimeout != searchHintTimeout) {
- return;
+ if (currentTimeout == searchHintTimeout) {
+ renderSearchResultsInOverlay(elem, result.SearchHints);
}
- renderSearchResultsInOverlay(elem, result.SearchHints);
+ Dashboard.hideLoadingMsg();
+ }).fail(function () {
+ Dashboard.hideLoadingMsg();
});
}
diff --git a/dashboard-ui/scripts/sections.js b/dashboard-ui/scripts/sections.js
index b2599d9f70..a0f6d65224 100644
--- a/dashboard-ui/scripts/sections.js
+++ b/dashboard-ui/scripts/sections.js
@@ -248,7 +248,8 @@
showTitle: showTitles,
centerText: true,
lazy: true,
- autoThumb: true
+ autoThumb: true,
+ transition: false
});
html += '
';
}
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index 0800fe20ff..6152989d35 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -35,7 +35,7 @@ var Dashboard = {
//$.mobile.popup.prototype.options.theme = "c";
$.mobile.popup.prototype.options.transition = "pop";
- //$.mobile.keepNative = "input[type='text'],input[type='password'],input[type='number']";
+ //$.mobile.keepNative = "textarea";
if ($.browser.mobile) {
$.mobile.defaultPageTransition = "none";
@@ -400,7 +400,7 @@ var Dashboard = {
elem.slideDown(400);
}
- elem.html(options.html).trigger("create");
+ elem.html(options.html).trigger('create');
if (options.timeout) {
@@ -1658,6 +1658,7 @@ var AppInfo = {};
if (isCordova) {
AppInfo.enableBottomTabs = true;
AppInfo.cardMargin = 'mediumCardMargin';
+ AppInfo.enableSectionTransitions = true;
} else {
if (isMobile) {
@@ -1678,14 +1679,10 @@ var AppInfo = {};
}
}
- AppInfo.enableMusicSongsTab = true;
-
if (!AppInfo.hasLowImageBandwidth) {
- AppInfo.enableLatestChannelItems = true;
AppInfo.enableStudioTabs = true;
AppInfo.enablePeopleTabs = true;
AppInfo.enableTvEpisodesTab = true;
- AppInfo.enableMusicArtistsTab = true;
AppInfo.enableMovieTrailersTab = true;
}
@@ -1706,7 +1703,8 @@ var AppInfo = {};
AppInfo.enableUserImage = true;
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
- AppInfo.enableBackButton = isIOS && window.navigator.standalone && !AppInfo.isNativeApp;
+ AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
+
AppInfo.supportsFullScreen = isCordova && isAndroid;
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
@@ -1802,10 +1800,6 @@ var AppInfo = {};
elem.addClass(AppInfo.cardMargin);
}
- if (!AppInfo.enableLatestChannelItems) {
- elem.addClass('latestChannelItemsDisabled');
- }
-
if (!AppInfo.enableStudioTabs) {
elem.addClass('studioTabDisabled');
}
@@ -1818,14 +1812,6 @@ var AppInfo = {};
elem.addClass('tvEpisodesTabDisabled');
}
- if (!AppInfo.enableMusicSongsTab) {
- elem.addClass('musicSongsTabDisabled');
- }
-
- if (!AppInfo.enableMusicArtistsTab) {
- elem.addClass('musicArtistsTabDisabled');
- }
-
if (!AppInfo.enableMovieTrailersTab) {
elem.addClass('movieTrailersTabDisabled');
}
diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js
index 576ba1f936..48440a3ccc 100644
--- a/dashboard-ui/scripts/sync.js
+++ b/dashboard-ui/scripts/sync.js
@@ -230,9 +230,8 @@
html += '
';
- html += '
';
html += '
';
- html += '';
+ html += '';
html += '
';
html += '';
diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css
index 5e6a0a98e1..7fb2f5e1e1 100644
--- a/dashboard-ui/themes/ios.css
+++ b/dashboard-ui/themes/ios.css
@@ -14,6 +14,7 @@
font-weight: 400;
text-transform: none;
color: #ccc !important;
+ padding-top: 16px;
}
.libraryViewNav .ui-btn-active {
@@ -97,13 +98,41 @@ h1, h1 a {
background: #1c1c1c;
}
-.libraryViewNavLinkContent {
- padding-top: 4px;
-}
-
.libraryMenuButtonText {
position: absolute;
- left: 0;
- right: 0;
+ left: 100px;
+ right: 100px;
text-align: center;
+ font-size: 16px;
+ margin: 0 auto !important;
}
+
+.libraryViewNav .material-icons {
+ display: block;
+ margin-top: -5px;
+ font-size: 14px;
+}
+
+paper-button[raised].submit {
+ background: none !important;
+ color: #2ad !important;
+ border: 1px solid #2ad !important;
+}
+
+paper-button[raised].more {
+ background: none !important;
+ color: orange !important;
+ border: 1px solid orange !important;
+}
+
+paper-button[raised].secondary {
+ background: none !important;
+ color: green !important;
+ border: 1px solid green !important;
+}
+
+paper-button[raised].cancel {
+ background: none !important;
+ color: #666 !important;
+ border: 1px solid #666 !important;
+}
\ No newline at end of file
diff --git a/dashboard-ui/thirdparty/cordova/chromecast.js b/dashboard-ui/thirdparty/cordova/chromecast.js
index 89939ca5c1..1d1497b580 100644
--- a/dashboard-ui/thirdparty/cordova/chromecast.js
+++ b/dashboard-ui/thirdparty/cordova/chromecast.js
@@ -489,7 +489,7 @@
currentSession.on('message', handleMessage);
currentSession.on('disconnect', handleSessionDisconnect);
- if (connectToSession || $.browser.safari) {
+ if (connectToSession /*|| $.browser.safari*/) {
currentSession.connect().success(function () {
onWebAppSessionConnect(currentSession, device);
diff --git a/dashboard-ui/thirdparty/cordova/generaldevice.js b/dashboard-ui/thirdparty/cordova/generaldevice.js
index 1b5a851f9a..5943ae1a76 100644
--- a/dashboard-ui/thirdparty/cordova/generaldevice.js
+++ b/dashboard-ui/thirdparty/cordova/generaldevice.js
@@ -7,6 +7,7 @@
var PlayerName = "ConnectSDK";
var currentDevice;
var currentDeviceId;
+ var currentMediaControl;
// MediaController needs this
self.name = PlayerName;
@@ -91,7 +92,41 @@
playItemInternal(items[0], null, serverAddress);
};
- function playItemInternal(items, startPosition) {
+ function validatePlaybackInfoResult(result) {
+
+ if (result.ErrorCode) {
+
+ MediaController.showPlaybackInfoErrorMessage(result.ErrorCode);
+ return false;
+ }
+
+ return true;
+ }
+
+ function getOptimalMediaSource(mediaType, versions) {
+
+ var optimalVersion = versions.filter(function (v) {
+
+ v.enableDirectPlay = MediaController.supportsDirectPlay(v);
+
+ return v.enableDirectPlay;
+
+ })[0];
+
+ if (!optimalVersion) {
+ optimalVersion = versions.filter(function (v) {
+
+ return v.SupportsDirectStream;
+
+ })[0];
+ }
+
+ return optimalVersion || versions.filter(function (s) {
+ return s.SupportsTranscoding;
+ })[0];
+ }
+
+ function playItemInternal(item, startPosition) {
if (item == null) {
throw new Error("item cannot be null");
@@ -113,43 +148,71 @@
Dashboard.showModalLoadingMsg();
}
- //getPlaybackInfo(item.Id, deviceProfile, startPosition).done(function (playbackInfoResult) {
+ MediaController.getPlaybackInfo(item.Id, deviceProfile, startPosition).done(function (playbackInfoResult) {
- // if (validatePlaybackInfoResult(playbackInfoResult)) {
+ if (validatePlaybackInfoResult(playbackInfoResult)) {
- // var mediaSource = getOptimalMediaSource(item.MediaType, playbackInfoResult.MediaSources);
+ var mediaSource = getOptimalMediaSource(item.MediaType, playbackInfoResult.MediaSources);
- // if (mediaSource) {
+ if (mediaSource) {
- // if (mediaSource.RequiresOpening) {
+ if (mediaSource.RequiresOpening) {
- // getLiveStream(item.Id, playbackInfoResult.PlaySessionId, deviceProfile, startPosition, mediaSource, null, null).done(function (openLiveStreamResult) {
+ getLiveStream(item.Id, playbackInfoResult.PlaySessionId, deviceProfile, startPosition, mediaSource, null, null).done(function (openLiveStreamResult) {
- // openLiveStreamResult.MediaSource.enableDirectPlay = supportsDirectPlay(openLiveStreamResult.MediaSource);
+ openLiveStreamResult.MediaSource.enableDirectPlay = supportsDirectPlay(openLiveStreamResult.MediaSource);
- // playInternalPostMediaSourceSelection(item, openLiveStreamResult.MediaSource, startPosition, callback);
- // });
+ playInternalPostMediaSourceSelection(item, openLiveStreamResult.MediaSource, startPosition, callback);
+ });
- // } else {
- // playInternalPostMediaSourceSelection(item, mediaSource, startPosition, callback);
- // }
- // } else {
- // Dashboard.hideModalLoadingMsg();
- // MediaController.showPlaybackInfoErrorMessage('NoCompatibleStream');
- // }
- // }
+ } else {
+ playInternalPostMediaSourceSelection(item, mediaSource, startPosition, callback);
+ }
+ } else {
+ Dashboard.hideModalLoadingMsg();
+ MediaController.showPlaybackInfoErrorMessage('NoCompatibleStream');
+ }
+ }
- //});
+ });
}
+
+ function playInternalPostMediaSourceSelection(item, mediaSource, startPosition, deferred) {
+
+ Dashboard.hideModalLoadingMsg();
+
+ var streamInfo = MediaPlayer.createStreamInfo('Video', item, mediaSource, startPosition);
+
+ currentDevice.getMediaPlayer().playMedia(
+ streamInfo.url,
+ streamInfo.MimeType,
+ {
+ title: item.Name,
+ description: item.Overview || '',
+ shouldLoop: false
+ }
+ ).success(function (launchSession, mediaControl) {
+
+ console.log("Video launch successful");
+ currentMediaControl = mediaControl && mediaControl.acquire();
+
+ }).error(function (err) {
+
+ console.log("error: " + err.message);
+ });
+
+ deferred.resolveWith(null, [streamInfo]);
+ }
+
self.unpause = function () {
- if (currentDevice) {
- currentDevice.getMediaControl().pause();
+ if (currentMediaControl) {
+ currentMediaControl.pause();
}
};
self.pause = function () {
- if (currentDevice) {
- currentDevice.getMediaControl().pause();
+ if (currentMediaControl) {
+ currentMediaControl.pause();
}
};
@@ -198,8 +261,8 @@
};
self.stop = function () {
- if (currentDevice) {
- currentDevice.getMediaControl().stop();
+ if (currentMediaControl) {
+ currentMediaControl.stop();
}
};
@@ -586,6 +649,7 @@
//currentDevice.disconnect();
currentDevice = null;
currentDeviceId = null;
+ currentMediaControl = null;
}
}
}
diff --git a/dashboard-ui/thirdparty/paper-button/paper-button-style.css b/dashboard-ui/thirdparty/paper-button/paper-button-style.css
index 889faaa707..f5865da927 100644
--- a/dashboard-ui/thirdparty/paper-button/paper-button-style.css
+++ b/dashboard-ui/thirdparty/paper-button/paper-button-style.css
@@ -18,11 +18,11 @@
}
paper-button.more {
- color: #388E3C;
+ color: #EC407A;
}
paper-button[raised].more {
- background: #388E3C;
+ background: #EC407A;
color: #fff;
}
@@ -92,7 +92,7 @@ paper-button.mini {
}
paper-button.mini .content {
- padding: 0.35em 0.7em;
+ padding: 0.4em 0.7em;
}
@@ -113,4 +113,4 @@ paper-toast {
/*paper-toast {
background-color: #eee;
color: #000;
-}*/
\ No newline at end of file
+}*/
diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html
index b7fcf9ebd0..171cecec91 100644
--- a/dashboard-ui/tvrecommended.html
+++ b/dashboard-ui/tvrecommended.html
@@ -9,11 +9,11 @@
${TabSuggestions}
diff --git a/dashboard-ui/tvupcoming.html b/dashboard-ui/tvupcoming.html
index 72b03385ad..a9b3e8a9f2 100644
--- a/dashboard-ui/tvupcoming.html
+++ b/dashboard-ui/tvupcoming.html
@@ -6,11 +6,11 @@