Re: [w3ctag/design-reviews] HTMLVideoElement.requestAnimationFrame() (#429)

My feedback from webkit-dev (https://lists.webkit.org/pipermail/webkit-dev/2020-January/031030.html):

> First, the name is confusing. It sounds like you're requesting a frame from the video, but it's really a "frame available" callback. Why not call it onFrameAvailable()?

> Second, its interaction with normal requestAnimationFrame() and the HTML event loop needs to be better defined. Where in in the https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model do these callbacks fire?

> I would expect something that's called "requestAnimationFrame" to only fire in the "update the rendering" steps; requestAnimationFrame is a "before rendering" callback. So firing a callback with the same name at other times seems like it will lead to author confusion.

> The author's expectation should be that any content/style changes they make inside a requestAnimationFrame callback will appear on-screen in the same frame as other changes in the same event loop cycle, and that requestAnimationFrame won't be called more often than is necessary to update the screen at the appropriate frame rate.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/429#issuecomment-579564363

Received on Wednesday, 29 January 2020 02:30:07 UTC