From 588e9e38f7c165c048e573156356f3fdd1419d5a Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:25:50 +1100 Subject: [PATCH 1/2] Don't send unsupported commands to Cast receiver --- src/plugins/chromecastPlayer/plugin.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/plugins/chromecastPlayer/plugin.js b/src/plugins/chromecastPlayer/plugin.js index de77b2cf3d..173239a442 100644 --- a/src/plugins/chromecastPlayer/plugin.js +++ b/src/plugins/chromecastPlayer/plugin.js @@ -678,11 +678,7 @@ class ChromecastPlayer { 'SetAudioStreamIndex', 'SetSubtitleStreamIndex', 'DisplayContent', - 'SetRepeatMode', - 'SetShuffleQueue', - 'EndSession', - 'PlayMediaSource', - 'PlayTrailers' + 'SetRepeatMode' ] }; } @@ -890,13 +886,7 @@ class ChromecastPlayer { } playTrailers(item) { - this._castPlayer.sendMessage({ - options: { - ItemId: item.Id, - ServerId: item.ServerId - }, - command: 'PlayTrailers' - }); + console.warn('[chromecastPlayer] Playing trailers is not supported.'); } setRepeatMode(mode) { @@ -909,12 +899,7 @@ class ChromecastPlayer { } setQueueShuffleMode(value) { - this._castPlayer.sendMessage({ - options: { - ShuffleMode: value - }, - command: 'SetShuffleQueue' - }); + console.warn('[chromecastPlayer] Setting shuffle queue mode is not supported.'); } toggleMute() { From d4288ead998df821a5cb89e6fe447fe8d346c4da Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:44:44 +1100 Subject: [PATCH 2/2] Remove unused vars --- src/plugins/chromecastPlayer/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/chromecastPlayer/plugin.js b/src/plugins/chromecastPlayer/plugin.js index 173239a442..59b01e15c2 100644 --- a/src/plugins/chromecastPlayer/plugin.js +++ b/src/plugins/chromecastPlayer/plugin.js @@ -885,7 +885,7 @@ class ChromecastPlayer { return state.ShuffleMode; } - playTrailers(item) { + playTrailers() { console.warn('[chromecastPlayer] Playing trailers is not supported.'); } @@ -898,7 +898,7 @@ class ChromecastPlayer { }); } - setQueueShuffleMode(value) { + setQueueShuffleMode() { console.warn('[chromecastPlayer] Setting shuffle queue mode is not supported.'); }