From 93a5237b79263994e6b540cbd97714144023f562 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 28 Feb 2022 12:44:26 -0500 Subject: [PATCH 1/2] Add google cast unsupported message and update translations --- src/components/playback/playerSelectionMenu.js | 8 ++++++++ src/strings/en-us.json | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/playback/playerSelectionMenu.js b/src/components/playback/playerSelectionMenu.js index 7e34ca90a3..f7eea17be1 100644 --- a/src/components/playback/playerSelectionMenu.js +++ b/src/components/playback/playerSelectionMenu.js @@ -3,6 +3,7 @@ import { Events } from 'jellyfin-apiclient'; import browser from '../../scripts/browser'; import loading from '../loading/loading'; import { playbackManager } from '../playback/playbackmanager'; +import { pluginManager } from '../pluginManager'; import { appRouter } from '../appRouter'; import globalize from '../../scripts/globalize'; import { appHost } from '../apphost'; @@ -130,6 +131,13 @@ export function show(button) { menuOptions.enableHistory = false; } + // Add message when Google Cast is not supported + const isChromecastPluginLoaded = !!pluginManager.plugins.find(plugin => plugin.id === 'chromecast'); + // TODO: Add other checks for support (Android app, secure context, etc) + if (!isChromecastPluginLoaded) { + menuOptions.text = `(${globalize.translate('GoogleCastUnsupported')})`; + } + actionsheet.show(menuOptions).then(function (id) { const target = targets.filter(function (t) { return t.id === id; diff --git a/src/strings/en-us.json b/src/strings/en-us.json index ee9adafaab..860278779e 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -76,7 +76,7 @@ "ButtonAudioTracks": "Audio Tracks", "ButtonBack": "Back", "ButtonCancel": "Cancel", - "ButtonCast": "Cast the media", + "ButtonCast": "Cast to Device", "ButtonChangeServer": "Change Server", "ButtonEditOtherUserPreferences": "Edit this user's profile, image and personal preferences.", "ButtonForgotPassword": "Forgot Password", @@ -283,6 +283,7 @@ "General": "General", "Genre": "Genre", "Genres": "Genres", + "GoogleCastUnsupported": "Google Cast Unsupported", "GroupBySeries": "Group by series", "GroupVersions": "Group versions", "GuestStar": "Guest star", @@ -563,7 +564,7 @@ "LabelCertificatePassword": "Certificate password:", "LabelCertificatePasswordHelp": "If your certificate requires a password, please enter it here.", "LabelChannels": "Channels:", - "LabelChromecastVersion": "Chromecast Version", + "LabelChromecastVersion": "Google Cast Version", "LabelCollection": "Collection:", "LabelColorPrimaries": "Color primaries:", "LabelColorSpace": "Color space:", @@ -714,7 +715,7 @@ "LabelMaxAudiobookResume": "Audiobook remaining minutes to resume:", "LabelMaxAudiobookResumeHelp": "Titles are assumed fully played if stopped when the remaining duration is less than this value.", "LabelMaxBackdropsPerItem": "Maximum number of backdrops per item:", - "LabelMaxChromecastBitrate": "Chromecast streaming quality:", + "LabelMaxChromecastBitrate": "Google Cast streaming quality:", "LabelMaxMuxingQueueSize": "Max muxing queue size:", "LabelMaxMuxingQueueSizeHelp": "Maximum number of packets that can be buffered while waiting for all streams to initialize. Try to increase it if you still meet \"Too many packets buffered for output stream\" error in FFmpeg logs. The recommended value is 2048.", "LabelMaxParentalRating": "Maximum allowed parental rating:", @@ -1421,7 +1422,7 @@ "StopRecording": "Stop recording", "Studios": "Studios", "Subtitle": "Subtitle", - "SubtitleAppearanceSettingsAlsoPassedToCastDevices": "These settings also apply to any Chromecast playback started by this device.", + "SubtitleAppearanceSettingsAlsoPassedToCastDevices": "These settings also apply to any Google Cast playback started by this device.", "SubtitleAppearanceSettingsDisclaimer": "Following settings do not apply to the graphical subtitles mentioned above or ASS/SSA subtitles that embed their own styles.", "SubtitleDownloadersHelp": "Enable and rank your preferred subtitle downloaders in order of priority.", "SubtitleOffset": "Subtitle Offset", From 8895e8d6c1576e873f66c72c5b8c7e41a7ac97b0 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 1 Mar 2022 17:15:02 -0500 Subject: [PATCH 2/2] Adjust action sheet styles --- src/components/actionSheet/actionSheet.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/actionSheet/actionSheet.scss b/src/components/actionSheet/actionSheet.scss index 87d6e9466c..7c1da7ad18 100644 --- a/src/components/actionSheet/actionSheet.scss +++ b/src/components/actionSheet/actionSheet.scss @@ -90,12 +90,13 @@ .actionSheetTitle { margin: 0.6em 0 0.7em !important; - padding: 0 0.9em; + padding: 0 0.75rem; flex-grow: 0; } .actionSheetText { - padding: 0 1em; + margin-top: 0; + padding: 0 0.75rem; flex-grow: 0; }