Bug 211945 - Implement HTMLVideoElement.requestVideoFrameCallback()
Summary: Implement HTMLVideoElement.requestVideoFrameCallback()
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Nobody
Keywords: InRadar
Depends on: 231803 231945 233185 233186 233306
  Show dependency treegraph
Reported: 2020-05-15 02:22 PDT by Thomas Steiner
Modified: 2022-02-19 10:53 PST (History)
14 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steiner 2020-05-15 02:22:17 PDT
HTMLVideoElement.requestVideoFrameCallback() allows web authors to register a callback which runs in the rendering steps when a new video frame is sent to the compositor. This is intended to allow web authors to do efficient per-video-frame processing of video, such as video processing and painting to a canvas, video analysis, or synchronization with external audio sources. This API has support from Mozilla (https://mozilla.github.io/standards-positions/#requestVideoFrameCallback) and is already implemented in Chromium.

Specification: https://wicg.github.io/video-rvfc/
Comment 1 Radar WebKit Bug Importer 2020-05-15 12:23:50 PDT
Comment 2 Will Morgan 2020-12-08 06:41:42 PST
This would really help synchronise WebGL UIs dependent on a video feed showing the device camera, or a webcam. Being able to link the requested frame rate from the camera and only render when a new frame is available would be good to maximise performance and battery life.

Render accuracy for our apps on Chrome has improved since adopting the API, and it would be great to see it on Safari/Webkit, too.
Comment 3 Thomas Steiner 2022-02-19 10:53:20 PST
This has landed. Thank you!