Web Audio doesn't resume when inside iframe
Reported by
chto...@gmail.com,
Dec 29 2017
|
||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Steps to reproduce the problem: 1. Have something that uses the Web Audio API in domain X. 2. Embed this content in a iframe in domain Y. 3. Check Audio will never start even if you use the AudioContext.resume(); after a user gesture. This line will constantly be be repeated in the console: "An AudioContext must be created or resumed after the document received a user gesture to enable audio playback." What is the expected behavior? What went wrong? Web Audio is not resumed after the user gesture. This issue only happens in iframes, the case described above (if you come from another domain to domain X, then audio will be resumed as expected after a user gesture). Did this work before? No Does this work in other browsers? Yes Chrome version: 65.0.3307.0 Channel: canary OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: It's something new to require a use gesture to enable audio playback on desktop Chrome. Also, this issue concerns the Web Audio API, I don't know if the HTML5 simple Audio can be concerned as well in an other manner.
,
Dec 29 2017
,
Dec 29 2017
,
Jan 1 2018
@Reporter: Could you please let us know how to set up two domains and check this issue.This would help in further triaging of the issue. Thanks!
,
Jan 1 2018
Hello, Well, I've tested this on my sites (both are HTTPS sites). But actually, you just need to own one domain, let's say it is mysite.com: - Upload all files included in "testcase.zip" above on mysite.com. - Go to any other site, let's say google.com, and open the browser console. - Go to mysite.com/test.html. The following message will show up in the console: "An AudioContext must be created or resumed after the document received a user gesture to enable audio playback." - Click anywhere on the page: audio will be resumed and played as expected. If you refresh the page, audio will be played without the need of a user gesture because you're coming from the same domain. - Now go to any other site than mysite.com, let's say google.com. Edit the source code using the browser console and add the following: <iframe src="https://www.mysite.com/test.html" width="400" height="400"></iframe> - Any click will produce: "An AudioContext must be created or resumed after the document received a user gesture to enable audio playback." in the console and Audio will never start/resume.
,
Jan 1 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 2 2018
@Reporter: Could you please share a sample test web URL as it would not be feasible for ET team to own a domain as per you comment#5. Any further inputs from your end may help us. Thanks!
,
Jan 2 2018
Thank you for providing more feedback. Adding requester "vamshi.kommuri@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 2 2018
Hello, Sure, here's a link to the test files. https://gdproductions.000webhostapp.com/test/test.html You should then be able to reproduce the issue by following the steps in comment#5.
,
Jan 3 2018
Sounds potentially related to user gesture support for out-of-process iframes (issue 589894). Could you open Chrome's task manager (by right clicking on the tab strip and choosing "Task manager") to see if there's a "Subframe" process for the iframe? If so, you might be running in the current Site Isolation field trial. Running Chrome with --disable-features=site-per-process,IsolateOrigins might make the bug go away. alexmos@, maybe you can take a look to confirm?
,
Jan 4 2018
Actually, this repros with and without OOPIFs. My repro: 1. Go to https://csreis.github.io/tests/cross-site-iframe.html 2. From DevTools, execute navFrame("https://gdproductions.000webhostapp.com/test/test.html") 3. This loads the audio repro into the iframe and outputs "An AudioContext must be created or resumed after the document received a user gesture to enable audio playback." 4. Click on the iframe. The message "An AudioContext must be created or resumed after the document received a user gesture to enable audio playback." is repeated and the audio never plays. In contrast, navigation to https://gdproductions.000webhostapp.com/test/test.html in a top-level frame outputs the same warning, but clicking it then plays the audio. Mounir, is this a problem with the implementation of the new autoplay policy? Changing chrome://flags/#autoplay-policy to "no user gesture is required" makes the whole problem go away, but it seems that with "Document user activation is required", clicking the iframe should allow it to play sound.
,
Jan 4 2018
Removing SiteIsolation label per c#12 since this is not specific to OOPIFs.
,
Jan 4 2018
,
Jan 5 2018
This does appear to be fixed in Version 65.0.3311.2 canary (64 bits) (Windows, Windows 7). Have tested everything in comment#12, including all options in chrome://flags/#autoplay-policy, everything work as expected.
,
Jan 5 2018
I think it was fixed by https://chromium.googlesource.com/chromium/src.git/+/0fd3d49d1efa94092df576e11e192e73e60e0e2e |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by chto...@gmail.com
, Dec 29 20171.9 MB
1.9 MB Download