Merge pull request #3377 from thornbill/fix-plugin-disabling

This commit is contained in:
Bill Thornton 2022-02-03 18:42:26 -05:00 committed by GitHub
commit 2700d7c8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,11 +137,11 @@ function loadPlugins() {
return getPlugins().then(function (list) {
if (!appHost.supports('remotecontrol')) {
// Disable remote player plugins if not supported
list.splice(list.indexOf('sessionPlayer'), 1);
list.splice(list.indexOf('chromecastPlayer'), 1);
list = list.filter(plugin => !plugin.startsWith('sessionPlayer')
&& !plugin.startsWith('chromecastPlayer'));
} else if (!browser.chrome && !browser.edgeChromium && !browser.opera) {
// Disable chromecast player in unsupported browsers
list.splice(list.indexOf('chromecastPlayer'), 1);
list = list.filter(plugin => !plugin.startsWith('chromecastPlayer'));
}
// add any native plugins