Add VideoSample.encodeOptions, optimized ArrayBuffer-backed VideoSample cloning

This commit is contained in:
Vanilagy
2026-06-02 18:01:22 +02:00
parent bb2f5d505d
commit 0cdf0063e2
6 changed files with 134 additions and 4 deletions
+4 -1
View File
@@ -330,9 +330,12 @@ videoSample.microsecondDuration; // => Duration in microseconds
videoSample.colorSpace; // => VideoColorSpace
videoSample.visibleRect; // Rectangle
// Encode options used when this sample is passed to an encoder
videoSample.encodeOptions; // => VideoEncoderEncodeOptions (defaults to {})
```
While all of these properties are read-only, you can use the `setTimestamp`, `setDuration` and `setRotation` methods to modify some of the metadata of the video sample.
While all of these properties are read-only, you can use the `setTimestamp`, `setDuration`, `setRotation` and `setEncodeOptions` methods to modify some of the metadata of the video sample.
::: warning
Timestamps can be [negative](#negative-timestamps).