Make playbackPermissionManager respect appHost capabilities.

This commit is contained in:
Ian Walton 2021-04-10 21:52:17 -04:00
parent 6f5517015e
commit 0671d7086b

View File

@ -1,4 +1,4 @@
import { getIgnorePlayPermission } from '../../../scripts/settings/webSettings'; import { appHost } from '../../apphost';
/** /**
* Creates an audio element that plays a silent sound. * Creates an audio element that plays a silent sound.
@ -35,7 +35,7 @@ class PlaybackPermissionManager {
* @returns {Promise} Promise that resolves succesfully if playback permission is allowed. * @returns {Promise} Promise that resolves succesfully if playback permission is allowed.
*/ */
async check () { async check () {
if (await getIgnorePlayPermission()) { if (appHost.supports("htmlaudioautoplay")) {
return true; return true;
} }