Code review changes.

This commit is contained in:
Ian Walton 2021-06-24 17:50:39 -04:00
parent c4e87eb562
commit 817953f87a
2 changed files with 5 additions and 5 deletions

View file

@ -34,12 +34,12 @@ class PlaybackPermissionManager {
* Tests playback permission. Grabs the permission when called inside a click event (or any other valid user interaction).
* @returns {Promise} Promise that resolves succesfully if playback permission is allowed.
*/
async check () {
check () {
if (appHost.supports('htmlaudioautoplay')) {
return true;
return Promise.resolve(true);
}
return await new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
const media = createTestMediaElement();
media.play().then(() => {
resolve();