WebAudio API does not allow playing audio from inside iframe
Reported by
velo...@gmail.com,
Apr 28 2017
|
|||||||
Issue descriptionDevice name: Samsung Galaxy S7 From "Settings > About Chrome" Application version: Chrome 57.0.2987.132 Operating system: Android 7.0.0; SM-G930F Build/NRD90M URLs (if applicable): https://achievemusic.com/good-times-bad-times-for-guitar/ Steps to reproduce: (1) Go to URL and wait for both page and IFrame to load (2) Press "Play" in the iframe Expected result: Audio should start playing Actual result: Nothing happens This used to work at least a week ago, and works if you go to the iframe URL directly (https://mms.achievemusic.com/embed.html#?ass_id=122524) Somehow, somewhere, playing audio from inside iframe via WebAudio has been disabled. And I understand how it might make sense (annoying ads) - but in this case it is heavily interfering with our legitimate business. There should be at least a way to tell the browser it is ok. An extra iframe attribute maybe?
,
Apr 28 2017
Sadly i cannot help. We do not test android iframes as part of our regular schedule. It could actually be a while. We only discovered this because we were asked about android integration for an upcoming product
,
Apr 28 2017
Thank you for providing more feedback. Adding requester "ppolisetty@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 16 2017
Tried https://achievemusic.com/good-times-bad-times-for-guitar/ with Chrome 58 (stable). I hear a guitar. It would be great if you could try with 58 instead of 57.
,
May 16 2017
Still persists with 58.0.3029.83. Do note that this error is Android-specific. Desktop versions have all worked just fine so far and hopefully continue to do so.
,
May 16 2017
Thank you for providing more feedback. Adding requester "rtoy@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 5 2017
From the developer console, I see ac0b5603.JSController.js:3 An AudioContext in a cross origin iframe must be created or resumed from a user gesture to enable audio output. I would think pressing the play button would enable audio output. Assigning to mlamouri who implemented the gesture requirements.
,
May 9 2018
This issue has re-surfaced in Chrome 66 (66.0.3359.126), presumably with the changes to the new autoplay policy. https://staging.matchmysound.com/iframe_test.html We do initialize AudioContext at page load, but after the policy change, I added a state check and .resume call before every play command. This seemed to fix the issue for the desktop browsers. On Android, however, the problem still persists. There are three related issues: a) Playback does not work even without the iframe: https://staging.matchmysound.com/embed.html#?ass_id=39937 b) Similarly, pressing play inside the iframe does not start audio playback, despite calling AudioContext.resume directly related to a user gesture (click) c) Pressing "Play/pause" button outside the iframe, that sends a postMessage into the iframe to start playback in direct response to a user gesture also fails. This use case is used in one of our products where the UI is provided externally and we just handle displaying notation and audio playback/recording All three things work in Desktop versions of Chrome 66, (linux and windows 66.0.3359.139). This is urgent, as we have ~100 000 paying users for whom the service (which centers around audio playback and recording) is now broken on one platform through no fault of our own.
,
May 9 2018
,
May 9 2018
See also issue 840866
,
May 9 2018
thank you for the link to main issue. this is separate, however as it arressee behavior specific to android that does not happen in desktop browsers and genuinely seems to be a bug as opposed to a designed feature. is there any way i can help get this issue resolved?
,
May 11 2018
You can use `allow=autoplay` on iframes to delegate autoplay privileges to a cross-origin iframe, such as `<iframe allow=autoplay>`. For more info: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe
,
May 15 2018
Unfortunately, allow="autoplay" does not seem to fix this issue. As of Android Crhome 66.0.3359.158 (a) now works, but neither (b) or (c) do, even after adding allow="autoplay" to the iframe. The AudioContext now shows as running, but the audio still does not play. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ppolise...@chromium.org
, Apr 28 2017Labels: Needs-Feedback