Skip to content

Commit

Permalink
FF130 Relnote: HTMLVideoElement.request/cancelVideoFrameCallback() su… (
Browse files Browse the repository at this point in the history
mdn#35319)

FF130 Relnote: HTMLVideoElement.request/cancelVideoFrameCallback() supported
  • Loading branch information
hamishwillee authored Aug 21, 2024
1 parent 4414bc2 commit 2ec002c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
40 changes: 40 additions & 0 deletions files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,46 @@ This includes: `SVGPathSegList`, [SVGPathElement.getPathSegAtLength()](/en-US/do

### Graphics: Canvas, WebGL, and WebGPU

#### Request video frame callbacks

The {{domxref('HTMLVideoElement/requestVideoFrameCallback','requestVideoFrameCallback()')}} method of the {{domxref('HTMLVideoElement')}} interface registers a callback function that runs when a new video frame is sent to the compositor. Developers can use this to perform operations on each video frame, enabling more efficient painting to a canvas, video analysis, synchronization with external audio sources, and so on. The method returns a callback handle that can be passed to {{domxref('HTMLVideoElement.cancelVideoFrameCallback()')}} in order to cancel the outstanding callback request. ([Firefox bug 1800882](https://bugzil.la/1800882)).

<table>
<thead>
<tr>
<th>Release channel</th>
<th>Version added</th>
<th>Enabled by default?</th>
</tr>
</thead>
<tbody>
<tr>
<th>Nightly</th>
<td>130</td>
<td>Yes</td>
</tr>
<tr>
<th>Developer Edition</th>
<td>130</td>
<td>No</td>
</tr>
<tr>
<th>Beta</th>
<td>130</td>
<td>No</td>
</tr>
<tr>
<th>Release</th>
<td>130</td>
<td>No</td>
</tr>
<tr>
<th>Preference name</th>
<td colspan="2"><code>media.rvfc.enabled</code></td>
</tr>
</tbody>
</table>

#### Hit regions

Whether the mouse coordinates are within a particular area on the canvas is a common problem to solve. The hit region API allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools.
Expand Down
5 changes: 5 additions & 0 deletions files/en-us/mozilla/firefox/releases/130/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ This article provides information about the changes in Firefox 130 that affect d

These features are newly shipped in Firefox 130 but are disabled by default. To experiment with them, search for the appropriate preference on the `about:config` page and set it to `true`. You can find more such features on the [Experimental features](/en-US/docs/Mozilla/Firefox/Experimental_features) page.

- **Request video frame callback:** `media.rvfc.enabled`.

The {{domxref('HTMLVideoElement/requestVideoFrameCallback','requestVideoFrameCallback()')}} method of the {{domxref('HTMLVideoElement')}} interface registers a callback function that runs when a new video frame is sent to the compositor. This enables developers to perform efficient operations on each video frame, such as video analysis, painting to a canvas, synchronization with external audio sources, and so on. The method returns a callback handle that can be passed to {{domxref('HTMLVideoElement.cancelVideoFrameCallback()')}} in order to cancel the outstanding callback request.
Both methods are are enabled by default on the nightly build. ([Firefox bug 1800882](https://bugzil.la/1800882)).

## Older versions

{{Firefox_for_developers}}

0 comments on commit 2ec002c

Please sign in to comment.