-
Notifications
You must be signed in to change notification settings - Fork 32
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
Usage of audio check in muted tab only works first call #52
Comments
I think I can reproduce. I added a "rerun tests" button to the example page and I have all autoplay blocked in Firefox and while it fails on the first run, all the tests pass on the second run. I can take a look at some point, but PRs would be greatly appreciated! |
Thanks for posting the link to the test. Oddly enough, I wasn't getting those error messages in Chrome. When I checked the link it gave in the message I think I found the clue as to why it is doing this... According to the link, autoplay is disabled until the user interacts with the document. By clicking on the rerun button the user is "interacting" with the document so, autoplay is allowed? (only guessing here). This is the same kind of situation I had, the initial test happened when the page was loaded and then when the user clicks a link it re-ran the test. I think maybe a good test to verify this would be to have a timer setup to re-run the test on intervals when the page loads. If my suspicions are correct the timer would return false every time since the test is running without any prior user interaction. |
Working with version 3.0.2, I have a call to the canAutoplay.audio() which correctly yields false when called the first time. However subsequent calls always return true.
Tried with chrome: Version 108.0.5359.98 (Official Build) (64-bit) on Linux, Chrome on android tablet and the behavior is the same. First call works like it should, second call always returns true.
The text was updated successfully, but these errors were encountered: