diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index cefae7b24c..2afe3eb6b2 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.110", - "_release": "1.1.110", + "version": "1.1.111", + "_release": "1.1.111", "_resolution": { "type": "version", - "tag": "1.1.110", - "commit": "ab24c293c88728733789d3fcdf127d18294a6148" + "tag": "1.1.111", + "commit": "6a58b3a503f28eda5198d662643edaedd921abbd" }, "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "^1.1.51", diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index 95980106ca..829b3332ca 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -589,7 +589,8 @@ var url = self.getUrl("socket"); url = replaceAll(url, 'emby/socket', 'embywebsocket'); - url = replaceAll(url, 'http', 'ws'); + url = replaceAll(url, 'https:', 'wss:'); + url = replaceAll(url, 'http:', 'ws:'); url += "?api_key=" + accessToken; url += "&deviceId=" + deviceId; diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index efb2397f10..af5645d577 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.445", - "_release": "1.4.445", + "version": "1.4.446", + "_release": "1.4.446", "_resolution": { "type": "version", - "tag": "1.4.445", - "commit": "b071fe73b76ee49a7b99f2688d925318680298a8" + "tag": "1.4.446", + "commit": "6b6f1772ecf75132f04e1ef08bcd37a5bcb040d1" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/chromecastplayer.js b/dashboard-ui/bower_components/emby-webcomponents/chromecastplayer.js index a7333f3b14..d147b32d02 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/chromecastplayer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/chromecastplayer.js @@ -514,8 +514,8 @@ } console.log('cc: connect'); - // Reset this so the next query doesn't make it appear like content is playing. - self.lastPlayerData = {}; + // Reset this so that statechange will fire + self.lastPlayerData = null; }); events.on(castPlayer, "playbackstart", function (e, data) { @@ -551,10 +551,16 @@ console.log('cc: volumechange'); var state = self.getPlayerStateInternal(data); - events.trigger(self, "volumechange", [state]); }); + events.on(castPlayer, "repeatmodechange", function (e, data) { + + console.log('cc: repeatmodechange'); + var state = self.getPlayerStateInternal(data); + events.trigger(self, "repeatmodechange", [state]); + }); + events.on(castPlayer, "playstatechange", function (e, data) { console.log('cc: playstatechange'); @@ -611,6 +617,13 @@ }); }; + self.playPause = function () { + castPlayer.sendMessage({ + options: {}, + command: 'PlayPause' + }); + }; + self.pause = function () { castPlayer.sendMessage({ options: {}, @@ -696,6 +709,12 @@ return state.PositionTicks; }; + self.duration = function() { + var state = self.lastPlayerData || {}; + state = state.NowPlayingItem || {}; + return state.RunTimeTicks; + }; + self.paused = function () { var state = self.lastPlayerData || {}; state = state.PlayState || {}; @@ -723,6 +742,12 @@ } }; + self.getRepeatMode = function () { + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.RepeatMode; + }; + self.setRepeatMode = function (mode) { castPlayer.sendMessage({ options: { @@ -809,10 +834,22 @@ }); }; + self.getAudioStreamIndex = function () { + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.AudioStreamIndex; + }; + self.subtitleTracks = function () { return []; }; + self.getSubtitleStreamIndex = function () { + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.SubtitleStreamIndex; + }; + self.setSubtitleStreamIndex = function (index) { castPlayer.sendMessage({ options: { @@ -822,6 +859,31 @@ }); }; + self.getMaxStreamingBitrate = function () { + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.MaxStreamingBitrate; + }; + + self.setMaxStreamingBitrate = function (bitrate) { + castPlayer.sendMessage({ + options: { + bitrate: bitrate + }, + command: 'SetMaxStreamingBitrate' + }); + }; + + self.isFullscreen = function () { + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.IsFullscreen; + }; + + self.toggleFullscreen = function () { + // not supported + }; + self.nextTrack = function () { castPlayer.sendMessage({ options: {}, @@ -892,18 +954,27 @@ self.getPlayerState = function () { - var result = self.getPlayerStateInternal(); - return Promise.resolve(result); + return Promise.resolve(self.getPlayerStateInternal()); }; self.lastPlayerData = {}; self.getPlayerStateInternal = function (data) { + var triggerStateChange = false; + if (data && !self.lastPlayerData) { + triggerStateChange = true; + } + data = data || self.lastPlayerData; self.lastPlayerData = data; - console.log(JSON.stringify(data)); + //console.log(JSON.stringify(data)); + + if (triggerStateChange) { + events.trigger(self, "statechange", [data]); + } + return data; }; diff --git a/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js b/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js index 5e35088cda..4924b9c11b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js @@ -813,10 +813,14 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g if (player) { + if (player.playPause) { + return player.playPause(); + } + if (player.paused()) { - self.unpause(); + return self.unpause(player); } else { - self.pause(); + return self.pause(player); } } }; @@ -1236,6 +1240,7 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g state.PlayState.IsMuted = player.isMuted(); state.PlayState.IsPaused = player.paused(); state.PlayState.RepeatMode = self.getRepeatMode(player); + state.PlayState.MaxStreamingBitrate = self.getMaxStreamingBitrate(player); if (streamInfo) { state.PlayState.PositionTicks = getCurrentTicks(player); diff --git a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js index 2f834f60cc..07c1dfb298 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js @@ -107,6 +107,24 @@ }); }; + self.currentTime = function (val) { + + if (val != null) { + return self.seek(val); + } + + var state = self.lastPlayerData || {}; + state = state.PlayState || {}; + return state.PositionTicks; + }; + + self.duration = function () { + + }; + + self.paused = function () { + }; + self.pause = function () { sendPlayStateCommand('Pause'); }; @@ -150,6 +168,10 @@ return []; }; + self.getAudioStreamIndex = function() { + + }; + self.setAudioStreamIndex = function (index) { sendCommandByName('SetAudioStreamIndex', { Index: index @@ -160,12 +182,36 @@ return []; }; + self.getSubtitleStreamIndex = function () { + + }; + self.setSubtitleStreamIndex = function (index) { sendCommandByName('SetSubtitleStreamIndex', { Index: index }); }; + self.getMaxStreamingBitrate = function () { + + }; + + self.setMaxStreamingBitrate = function (bitrate) { + + }; + + self.isFullscreen = function () { + + }; + + self.toggleFullscreen = function () { + + }; + + self.getRepeatMode = function () { + + }; + self.setRepeatMode = function (mode) { sendCommandByName('SetRepeatMode', {