diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index b4525de5f6..1ebbb0c9eb 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -144,11 +144,16 @@ .cardContent .cardFooter { position: absolute; bottom: 0; - background: rgba(0, 0, 0, .75); left: 0; color: #eee; padding: 6px 0 2px 0; max-width: 100%; + background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%) !important; /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.7))) !important; /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* IE10+ */ + background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.75) 100%) !important; /* W3C */ } .lightCardFooter { @@ -187,7 +192,7 @@ } .cardContent .cardFooter .cardText { - font-size: 15px; + font-size: 14px; } .cardOverlayInner { diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 5123b8c317..07633982ce 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -28,6 +28,7 @@ var PlayerName = 'Chromecast'; + var applicationID = "2D4B1DA3"; var messageNamespace = 'urn:x-cast:com.connectsdk'; var CastPlayer = function () { @@ -72,14 +73,6 @@ return; } - // v1 Id AE4DA10A - // v2 Id 472F0435 - // v3 Id 69C59853 - // v4 Id F4EB2E8E - // default receiver chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID - - var applicationID = "F4EB2E8E"; - // request session var sessionRequest = new chrome.cast.SessionRequest(applicationID); var apiConfig = new chrome.cast.ApiConfig(sessionRequest, @@ -393,14 +386,6 @@ this.currentMediaSession.addUpdateListener(this.mediaStatusUpdateHandler); }; - /** - * Callback function when media load returns error - */ - CastPlayer.prototype.onLoadMediaError = function (e) { - console.log("chromecast media error"); - this.castPlayerState = PLAYER_STATE.IDLE; - }; - /** * Callback function for media status update from receiver * @param {!Boolean} e true/false @@ -413,46 +398,6 @@ console.log("chromecast updating media: " + e); }; - /** - * Play media in Cast mode - */ - CastPlayer.prototype.playMedia = function () { - - if (!this.currentMediaSession) { - return; - } - - this.currentMediaSession.play(null, this.mediaCommandSuccessCallback.bind(this, "playing started for " + this.currentMediaSession.sessionId), this.errorHandler); - //this.currentMediaSession.addUpdateListener(this.mediaStatusUpdateHandler); - }; - - /** - * Pause media playback in Cast mode - */ - CastPlayer.prototype.pauseMedia = function () { - - if (!this.currentMediaSession) { - return; - } - - this.currentMediaSession.pause(null, this.mediaCommandSuccessCallback.bind(this, "paused " + this.currentMediaSession.sessionId), this.errorHandler); - }; - - /** - * Stop CC playback - */ - CastPlayer.prototype.stopMedia = function () { - - if (!this.currentMediaSession) { - return; - } - - this.currentMediaSession.stop(null, - this.mediaCommandSuccessCallback.bind(this, "stopped " + this.currentMediaSession.sessionId), - this.errorHandler); - this.castPlayerState = PLAYER_STATE.STOPPED; - }; - /** * Set media volume in Cast mode * @param {Boolean} mute A boolean @@ -484,39 +429,6 @@ this.setReceiverVolume(true); }; - /** - * media seek function in either Cast or local mode - * @param {Event} e An event object from seek - */ - CastPlayer.prototype.seekMedia = function (event) { - - var pos = parseInt(event); - - var curr = pos / 10000000; - - if (!this.currentMediaSession) { - return; - } - - var request = new chrome.cast.media.SeekRequest(); - request.currentTime = curr; - - this.currentMediaSession.seek(request, - this.onSeekSuccess.bind(this, 'media seek done'), - this.errorHandler); - - this.castPlayerState = PLAYER_STATE.SEEKING; - }; - - /** - * Callback function for seek success - * @param {String} info A string that describe seek event - */ - CastPlayer.prototype.onSeekSuccess = function (info) { - console.log(info); - this.castPlayerState = PLAYER_STATE.PLAYING; - }; - /** * Callback function for media command success */ @@ -624,11 +536,17 @@ }; self.unpause = function () { - castPlayer.playMedia(); + castPlayer.sendMessage({ + options: {}, + command: 'Unpause' + }); }; self.pause = function () { - castPlayer.pauseMedia(); + castPlayer.sendMessage({ + options: {}, + command: 'Pause' + }); }; self.shuffle = function (id) { @@ -676,7 +594,10 @@ }; self.stop = function () { - castPlayer.stopMedia(); + castPlayer.sendMessage({ + options: {}, + command: 'Stop' + }); }; self.displayContent = function (options) { @@ -688,7 +609,10 @@ }; self.mute = function () { - castPlayer.mute(); + castPlayer.sendMessage({ + options: {}, + command: 'Mute' + }); }; self.unMute = function () { @@ -748,7 +672,17 @@ }; self.seek = function (position) { - castPlayer.seekMedia(position); + + position = parseInt(position); + + position = position / 10000000; + + castPlayer.sendMessage({ + options: { + position: position + }, + command: 'Seek' + }); }; self.setAudioStreamIndex = function (index) { @@ -813,7 +747,13 @@ vol = Math.min(vol, 100); vol = Math.max(vol, 0); - castPlayer.setReceiverVolume(false, (vol / 100)); + //castPlayer.setReceiverVolume(false, (vol / 100)); + castPlayer.sendMessage({ + options: { + volume: vol + }, + command: 'SetVolume' + }); }; self.getPlayerState = function () { diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 13330f8136..6b9026c470 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -641,7 +641,7 @@ imgUrl = 'css/images/clients/ios.png'; } else { - imgUrl = 'css/images/clients/html5.png'; + imgUrl = 'css/images/clients/android.png'; } return "Emby Mobile"; diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 715e3d9c80..3b2e9194fb 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -4,7 +4,7 @@ var html = '
'; - if (($.browser.safari && window.navigator.standalone) || Dashboard.isRunningInCordova()) { + if (AppInfo.enableBackButton) { html += ''; } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 4d41c55b8d..1568ce5c8f 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1095,7 +1095,7 @@ // Reports of stuttering with h264 stream copy in IE if (streamInfo.playMethod == 'Transcode' && videoUrl.indexOf('.m3u8') == -1) { - videoUrl += 'EnableAutoStreamCopy=false'; + videoUrl += '&EnableAutoStreamCopy=false'; } var posterCode = self.getPosterUrl(item); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 46a5659b73..0806a00620 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1561,6 +1561,8 @@ var AppInfo = {}; AppInfo.enableUserImage = true; AppInfo.hasPhysicalVolumeButtons = isCordova || $.browser.mobile; + + AppInfo.enableBackButton = ($.browser.safari && window.navigator.standalone) || (isCordova && $.browser.safari); } function initializeApiClient(apiClient) { @@ -1841,9 +1843,8 @@ var AppInfo = {}; } function initCordovaWithDeviceId(deferred, deviceId) { - if ($.browser.safari) { - requirejs(['thirdparty/cordova/imagestore.js']); - } + + requirejs(['thirdparty/cordova/imagestore.js']); init(deferred, "Emby Mobile", deviceId, device.model, true); } diff --git a/dashboard-ui/scripts/wizardsettings.js b/dashboard-ui/scripts/wizardsettings.js index f3d184a6df..425a43d068 100644 --- a/dashboard-ui/scripts/wizardsettings.js +++ b/dashboard-ui/scripts/wizardsettings.js @@ -82,6 +82,8 @@ $(document).on('pageinitdepends', "#wizardSettingsPage", function () { + var page = this; + $('.wizardSettingsForm', page).off('submit', onSubmit).on('submit', onSubmit); }).on('pageshowready', "#wizardSettingsPage", function () { diff --git a/dashboard-ui/thirdparty/apiclient/connectionmanager.js b/dashboard-ui/thirdparty/apiclient/connectionmanager.js index 041859ab42..3db258a906 100644 --- a/dashboard-ui/thirdparty/apiclient/connectionmanager.js +++ b/dashboard-ui/thirdparty/apiclient/connectionmanager.js @@ -847,7 +847,7 @@ skipTest = true; } enableRetry = true; - timeout = 7000; + timeout = 5000; } else if (mode == MediaBrowser.ConnectionMode.Manual) { diff --git a/dashboard-ui/thirdparty/cordova/chromecast.js b/dashboard-ui/thirdparty/cordova/chromecast.js index a9476c6c0a..78516b36f8 100644 --- a/dashboard-ui/thirdparty/cordova/chromecast.js +++ b/dashboard-ui/thirdparty/cordova/chromecast.js @@ -1,7 +1,7 @@ (function () { var PlayerName = "Chromecast"; - var ApplicationID = "F4EB2E8E"; + var ApplicationID = "2D4B1DA3"; var currentPairingDeviceId; var currentPairedDeviceId; var currentDeviceFriendlyName; diff --git a/dashboard-ui/thirdparty/cordova/registrationservices.js b/dashboard-ui/thirdparty/cordova/registrationservices.js index 11f8661f34..f67fa327ec 100644 --- a/dashboard-ui/thirdparty/cordova/registrationservices.js +++ b/dashboard-ui/thirdparty/cordova/registrationservices.js @@ -46,9 +46,9 @@ var deferred = DeferredBuilder.Deferred(); if (name == 'playback') { - validatePlayback(); + validatePlayback(deferred); } else if (name == 'livetv') { - validateLiveTV(); + validateLiveTV(deferred); } else { deferred.resolve(); } diff --git a/dashboard-ui/thirdparty/cordova/serverdiscovery.js b/dashboard-ui/thirdparty/cordova/serverdiscovery.js index 8222ee735a..61c88b0987 100644 --- a/dashboard-ui/thirdparty/cordova/serverdiscovery.js +++ b/dashboard-ui/thirdparty/cordova/serverdiscovery.js @@ -135,14 +135,18 @@ deviceReadyPromise.done(function () { - findServersInternal(timeoutMs).done(function (result) { + try { + findServersInternal(timeoutMs).done(function (result) { - deferred.resolveWith(null, [result]); + deferred.resolveWith(null, [result]); - }).fail(function () { + }).fail(function () { + deferred.reject(); + }); + } catch (err) { deferred.reject(); - }); + } }); return deferred.promise();