From 8c2b65740f5cd4dc09d5095bef7bc360288a7352 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 27 Jun 2015 23:29:50 -0400 Subject: [PATCH] update dynamic images --- dashboard-ui/cordova/chromecast.js | 48 +++---- dashboard-ui/cordova/imagestore.js | 2 +- dashboard-ui/css/mediaplayer-video.css | 10 +- dashboard-ui/css/nowplaying.css | 18 ++- dashboard-ui/favorites.html | 1 - dashboard-ui/homelatest.html | 25 ---- dashboard-ui/index.html | 1 - dashboard-ui/itemdetails.html | 1 - dashboard-ui/nowplaying.html | 2 +- dashboard-ui/scripts/homelatest.js | 48 ------- dashboard-ui/scripts/itemdetailpage.js | 2 - dashboard-ui/scripts/librarylist.js | 2 +- dashboard-ui/scripts/librarymenu.js | 21 ++-- dashboard-ui/scripts/site.js | 2 +- .../thirdparty/jquery.unveil-custom.js | 117 ++++++++++++++---- dashboard-ui/tvrecommended.html | 1 - dashboard-ui/tvupcoming.html | 1 - 17 files changed, 153 insertions(+), 149 deletions(-) delete mode 100644 dashboard-ui/homelatest.html delete mode 100644 dashboard-ui/scripts/homelatest.js diff --git a/dashboard-ui/cordova/chromecast.js b/dashboard-ui/cordova/chromecast.js index 742b1e5a43..0ea0d713d5 100644 --- a/dashboard-ui/cordova/chromecast.js +++ b/dashboard-ui/cordova/chromecast.js @@ -27,14 +27,14 @@ $(castPlayer).on("connect", function (e) { - Logger.log('cc: connect'); + console.log('cc: connect'); // Reset this so the next query doesn't make it appear like content is playing. self.lastPlayerData = {}; }); $(castPlayer).on("playbackstart", function (e, data) { - Logger.log('cc: playbackstart'); + console.log('cc: playbackstart'); var state = self.getPlayerStateInternal(data); $(self).trigger("playbackstart", [state]); @@ -42,7 +42,7 @@ $(castPlayer).on("playbackstop", function (e, data) { - Logger.log('cc: playbackstop'); + console.log('cc: playbackstop'); var state = self.getPlayerStateInternal(data); $(self).trigger("playbackstop", [state]); @@ -53,7 +53,7 @@ $(castPlayer).on("playbackprogress", function (e, data) { - Logger.log('cc: positionchange'); + console.log('cc: positionchange'); var state = self.getPlayerStateInternal(data); $(self).trigger("positionchange", [state]); @@ -288,10 +288,12 @@ return target; } - function isChromecast(name) { + function isChromecastName(name) { name = (name || '').toLowerCase(); - var validTokens = ['nexusplayer', 'chromecast', 'eurekadongle']; + var validTokens = ['nexusplayer']; + //validTokens.push('chromecast'); + //validTokens.push('eurekadongle'); return validTokens.filter(function (t) { @@ -304,7 +306,7 @@ return ConnectSDKHelper.getDeviceList().filter(function (d) { - return isChromecast(d.getModelName()) || isChromecast(d.getFriendlyName()); + return d.hasService('Chromecast') || d.hasService('ChromeCast') || isChromecastName(d.getModelName()) || isChromecastName(d.getFriendlyName()); }).map(convertDeviceToTarget); }; @@ -416,7 +418,7 @@ data = data || self.lastPlayerData; self.lastPlayerData = data; - Logger.log(JSON.stringify(data)); + console.log(JSON.stringify(data)); return data; }; @@ -459,7 +461,7 @@ } function handleSessionDisconnect() { - Logger.log("session disconnected"); + console.log("session disconnected"); cleanupSession(); MediaController.removeActivePlayer(PlayerName); @@ -469,7 +471,7 @@ currentWebAppSession = webAppSession; - Logger.log('session.connect succeeded'); + console.log('session.connect succeeded'); webAppSession.setWebAppSessionListener(); MediaController.setActivePlayer(PlayerName, convertDeviceToTarget(device)); @@ -530,15 +532,15 @@ function tryLaunchWebSession(device) { - Logger.log('calling launchWebApp'); + console.log('calling launchWebApp'); device.getWebAppLauncher().launchWebApp(ApplicationID).success(function (session) { - Logger.log('launchWebApp success. calling onSessionConnected'); + console.log('launchWebApp success. calling onSessionConnected'); setupWebAppSession(device, session, true); }).error(function (err1) { - Logger.log('launchWebApp error:' + JSON.stringify(err1)); + console.log('launchWebApp error:' + JSON.stringify(err1)); }); } @@ -547,22 +549,22 @@ // First try to join existing session. If it fails, launch a new one - Logger.log('calling joinWebApp'); + console.log('calling joinWebApp'); device.getWebAppLauncher().joinWebApp(ApplicationID).success(function (session) { - Logger.log('joinWebApp success. calling onSessionConnected'); + console.log('joinWebApp success. calling onSessionConnected'); setupWebAppSession(device, session, false); }).error(function (err) { - Logger.log('joinWebApp error: ' + JSON.stringify(err)); + console.log('joinWebApp error: ' + JSON.stringify(err)); if (enableRetry) { tryJoinWebSession(device, false); return; } - Logger.log('calling launchWebApp'); + console.log('calling launchWebApp'); tryLaunchWebSession(device); }); @@ -581,7 +583,7 @@ device.off("ready"); - Logger.log('creating webAppSession'); + console.log('creating webAppSession'); launchWebApp(device); } @@ -608,7 +610,7 @@ self.tryPairWithDevice = function (device, deferred) { - Logger.log('Will attempt to connect to Chromecast'); + console.log('Will attempt to connect to Chromecast'); device.on("disconnect", function () { device.off("ready"); @@ -616,18 +618,18 @@ }); if (device.isReady()) { - Logger.log('Device is already ready, calling onDeviceReady'); + console.log('Device is already ready, calling onDeviceReady'); onDeviceReady(device); } else { - Logger.log('Binding device ready handler'); + console.log('Binding device ready handler'); device.on("ready", function () { - Logger.log('device.ready fired'); + console.log('device.ready fired'); onDeviceReady(device); }); - Logger.log('Calling device.connect'); + console.log('Calling device.connect'); device.connect(); } }; diff --git a/dashboard-ui/cordova/imagestore.js b/dashboard-ui/cordova/imagestore.js index 515ccb8336..aab7b0092a 100644 --- a/dashboard-ui/cordova/imagestore.js +++ b/dashboard-ui/cordova/imagestore.js @@ -2,7 +2,7 @@ function setImageIntoElement(elem, url) { - if (elem.tagName === "DIV") { + if (elem.tagName !== "IMG") { elem.style.backgroundImage = "url('" + url + "')"; diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index acecfcf6f8..1d11bd09d0 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -36,7 +36,7 @@ } .videoControls { - padding: .5em .5em; + padding: 0 .5em; background-color: rgba(0, 0, 0, .7); position: fixed; left: 0; @@ -199,7 +199,7 @@ } } -@media all and (max-width: 1400px), all and (max-height: 800px) { +@media all and (max-width: 1400px), all and (max-height: 900px) { #mediaPlayer .nowPlayingInfo { display: none !important; @@ -216,15 +216,15 @@ } } -@media all and (min-width: 1300px) { +@media all and (min-width: 1400px) { .nowPlayingInfo { padding-bottom: 0; } #videoPlayer .nowPlayingImage img { height: auto !important; - max-width: 400px; - max-height: 240px; + max-width: 360px; + max-height: 220px; } } diff --git a/dashboard-ui/css/nowplaying.css b/dashboard-ui/css/nowplaying.css index c269a9fa52..2186b10bb9 100644 --- a/dashboard-ui/css/nowplaying.css +++ b/dashboard-ui/css/nowplaying.css @@ -148,8 +148,13 @@ @media (orientation: landscape) and (max-height: 400px) { .nowPlayingPageTitle { - margin-top: -1.5em; - padding: 0 60px; + margin: 0 auto; + width: 50%; + position: absolute; + text-align: center; + left: 0; + right: 0; + top: -20px; } .nowPlayingPage .btnCommand, .nowPlayingPage .btnPlayStateCommand { @@ -160,8 +165,13 @@ @media (orientation: portrait) and (max-height: 600px) { .nowPlayingPageTitle { - margin-top: -1.5em; - padding: 0 60px; + margin: 0 auto; + width: 50%; + position: absolute; + text-align: center; + left: 0; + right: 0; + top: -20px; } .nowPlayingPage .btnCommand, .nowPlayingPage .btnPlayStateCommand { diff --git a/dashboard-ui/favorites.html b/dashboard-ui/favorites.html index 85128e61c0..d8ef0f8d91 100644 --- a/dashboard-ui/favorites.html +++ b/dashboard-ui/favorites.html @@ -8,7 +8,6 @@
home${TabHome} - new_releases${TabLatest} navigate_next${TabNextUp} favorite${TabFavorites} schedule${TabUpcoming} diff --git a/dashboard-ui/homelatest.html b/dashboard-ui/homelatest.html deleted file mode 100644 index f228405ed1..0000000000 --- a/dashboard-ui/homelatest.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Emby - - - - - diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index 106ec6ac17..04912490fa 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -9,7 +9,6 @@
home${TabHome} - new_releases${TabLatest} navigate_next${TabNextUp} favorite${TabFavorites} schedule${TabUpcoming} diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 885d088ec5..857b876a01 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -9,7 +9,6 @@