1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3472 from thornbill/add-chromecast-unsupported

Add google cast unsupported message and update translations
This commit is contained in:
Bill Thornton 2022-03-02 09:31:12 -05:00 committed by GitHub
commit 6f3f15d5c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View file

@ -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;
}

View file

@ -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;