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

Add google cast unsupported message and update translations

This commit is contained in:
Bill Thornton 2022-02-28 12:44:26 -05:00
parent 188dcf820e
commit 93a5237b79
2 changed files with 13 additions and 4 deletions

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;