apache / cordova-plugin-media

Apache Cordova Media Plugin
https://cordova.apache.org/
Apache License 2.0
388 stars 767 forks source link

test(browser): disable test cases w/ play() due to Autoplay Policy #318

Closed erisu closed 2 years ago

erisu commented 2 years ago

Platforms affected

Browser (Test Specs)

Motivation and Context

Test failing due to Chrome's Autoplay Policy

Description

This PR disables test case 21, 22, and 27 because these calls play() method which is against Chrome's Autoplay Policy.

The Error:

Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

The Reason:

The Autoplay Policy launched in Chrome 66 for audio and video elements and is effectively blocking roughly half of unwanted media autoplays in Chrome. For the Web Audio API, the autoplay policy launched in Chrome 71. This affects web games, some WebRTC applications, and other web pages using audio features. More details can be found in the Web Audio API section below.

Testing

Checklist