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 ""; 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 = '