Type
MediabunnyServerOptions
Options for configuring Mediabunny's server-side polyfills.
ts
type MediabunnyServerOptions = {
hardwareContext?:
| NodeAv.HardwareContext
| null
| ((codecId: NodeAv.AVCodecID) => MaybePromise<NodeAv.HardwareContext | null>);
};See MaybePromise.
Used by
Properties
hardwareContext
ts
hardwareContext?: HardwareContext | ((codecId: AVCodecID) => MaybePromise<HardwareContext | null>) | null;The hardware context to use for hardware-accelerated decoding and encoding. When set to a NodeAv.HardwareContext, that context is used directly. When set to a function, the function is invoked (with no caching) every time a hardware decoder or encoder codec is resolved, receiving the codec ID and returning the context to use for it (or null for no hardware acceleration).
When not set, a context is automatically detected on first use and then cached.
See MaybePromise.