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
+9
View File
@@ -482,6 +482,15 @@ export const SECOND_TO_MICROSECOND_FACTOR = 1e6 * (1 + Number.EPSILON);
*/
export type SetRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
/**
* Recursively makes all properties of T readonly.
* @group Miscellaneous
* @public
*/
export type DeepReadonly<T> = T extends object ? {
readonly [K in keyof T]: DeepReadonly<T[K]>;
} : T;
/**
* Sets all keys K of T to be optional.
* @group Miscellaneous