You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2021/10/06 13:13:36 UTC
[cordova-plugin-media] branch master updated: test(browser):
disable test cases w/ play() due to Chrome's Autoplay Policy (#318)
This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-media.git
The following commit(s) were added to refs/heads/master by this push:
new 70a78a2 test(browser): disable test cases w/ play() due to Chrome's Autoplay Policy (#318)
70a78a2 is described below
commit 70a78a225e41a96e6489604ddfb3756604076b55
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Wed Oct 6 22:13:29 2021 +0900
test(browser): disable test cases w/ play() due to Chrome's Autoplay Policy (#318)
---
tests/tests.js | 48 +++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 45 insertions(+), 3 deletions(-)
diff --git a/tests/tests.js b/tests/tests.js
index 786fd1c..b2e4251 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -321,7 +321,21 @@ exports.defineAutoTests = function () {
it(
'media.spec.21 should be able to resume playback after pause',
function (done) {
- if (!isAudioSupported || cordova.platformId === 'blackberry10' || isKitKat) {
+ if (!isAudioSupported || cordova.platformId === 'blackberry10' || isKitKat || isBrowser) {
+ /**
+ * Browser Error:
+ * Uncaught (in promise) DOMException: play() failed because the user didn't interact with
+ * the document first. https://goo.gl/xX8pDD
+ *
+ * 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.
+ *
+ * Due to the Chrome Policies, this test is disabled because it can not be run without user
+ * interations.
+ */
pending();
}
@@ -373,7 +387,21 @@ exports.defineAutoTests = function () {
it(
'media.spec.22 should be able to seek through file',
function (done) {
- if (!isAudioSupported || cordova.platformId === 'blackberry10' || isKitKat) {
+ if (!isAudioSupported || cordova.platformId === 'blackberry10' || isKitKat || isBrowser) {
+ /**
+ * Browser Error:
+ * Uncaught (in promise) DOMException: play() failed because the user didn't interact with
+ * the document first. https://goo.gl/xX8pDD
+ *
+ * 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.
+ *
+ * Due to the Chrome Policies, this test is disabled because it can not be run without user
+ * interations.
+ */
pending();
}
@@ -540,7 +568,21 @@ exports.defineAutoTests = function () {
it('media.spec.27 should call success or error when trying to stop a media that is in starting state', function (done) {
// bb10 dialog pops up, preventing tests from running
- if (!isAudioSupported || cordova.platformId === 'blackberry10') {
+ if (!isAudioSupported || cordova.platformId === 'blackberry10' || isBrowser) {
+ /**
+ * Browser Error:
+ * Uncaught (in promise) DOMException: play() failed because the user didn't interact with
+ * the document first. https://goo.gl/xX8pDD
+ *
+ * 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.
+ *
+ * Due to the Chrome Policies, this test is disabled because it can not be run without user
+ * interations.
+ */
pending();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org