Drop m.redraw.sync()
from v3
#3004
dead-claudia
started this conversation in
Ideas
Replies: 1 comment
-
I'm in favour, I've personally never used it in production. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
redraw.sync()
was previously added because iOS used to refuse to autoplay<audio autoplay>
and<video autoplay>
elements unless they were added to the DOM during the execution of a user interaction event listener. WebKit relaxed this for silent videos, but nothing in that article indicates anything else changed.From my own recent testing on iOS, their blocking mechanism changed from an "is this synchronous" check to a simple 5 second timer after user interaction before autoplay fails - as long as less than 5 seconds have elapsed, no matter where you are in the code, it's fair game now. This timer starts before the handler (came to about 50ms or so on my phone), but is not checked until after the handler executes.
Since it no longer matters whether things are done synchronously or not, it's safe to do that kind of thing in an animation frame callback now. And because of it,
redraw.sync()
is no longer needed.Beta Was this translation helpful? Give feedback.
All reactions