-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox to implement auto-blocking of audio, we should test and make sure we handle it #58
Comments
There is a line in the above-referenced article that makes me think that this won't affect our implementation. It says,
This makes me think that they're only blocking what I believe is the older way of playing audio from a browser, based on |
Assigning to @phet-steele at @ariel-phet's suggestion. @phet-steele - I don't know for certain, but I suspect that Firefox has things set up similar to Chrome where it's possible to install pre-release versions and test with them. Can you please get set up to test with the upcoming version (which I believe is version 66) and test the sims that use the tambo libary and make sure they work? The published sims are John Travoltage and Resistance in a Wire, and it would be good to also check the latest Friction RC too. Also, please test the master version of the tambo demo. If you have a Mac available, please test on both Windows and Mac, otherwise, assign it to @ariel-phet when you're done so that we can figure out how to test Mac as well. |
Testing suggested sims on Windows 10 with FF 66.0b7: sound works Tambo demo on same platform: sound works However, there was a neat interaction with the dev tools. Opening dev tools for the first time mutes all sound. Closing the dev tools, then opening the dev tools a second time brings sound back. It will even play all the sound it "queued" when sound was muted. This cycle repeats on each successive opening/closing of the dev tool. Hopefully our users on FF don't use the dev tools often 😉. EDIT: Mac behaves identically. |
I took a look at the behavior with respect to the developer tools, and indeed, it seems that the audio context is being suspended when developer tools are opened. I'm seeing this on Firefox version 65.0.1, so it doesn't appear to be new. I did some online searches and see no mention of this, so perhaps I should log an issue with Firefox. I tried simply calling |
@phet-steele - I've generalized the code that watches for changes to the audio context's state and "resumes" it. Please test on master and see if the weirdness that you were seeing with dev tools is now gone. It is fixed for me on Firefox version 65.0.1. |
…audio context state behavior in different browsers, see #58, phetsims/friction#161, phetsims/resistance-in-a-wire#190, phetsims/friction#173, and phetsims/resistance-in-a-wire#199
For the record, I logged a bug with Mozilla about the odd behavior in Firefox where the audio context becomes suspended when the dev tools are opened. As of this writing, it looks like they have confirmed the bug. See https://bugzilla.mozilla.org/show_bug.cgi?id=1535089. |
I just noticed that this bug was languishing due to @phet-steele having left PhET. Assigning to @KatieWoe for followup. |
This seems to have been implemented for some time and I have not seen any major problems during my tenure here. Only thing we've seen is described here: phetsims/gravity-force-lab#252
|
I just saw an article about Firefox starting to auto-block audio and video on web pages until the user interacts with the page. Hopefully, this will be handled by the code already in place to handle similar behaviors seen in Chrome and Safari, see #9.
I will also log a similar issue for the vibe repo.
The text was updated successfully, but these errors were encountered: