A base class for encoders. Custom frame encoders may be implemented and used by Hubble as new capture technologies advance, or uncommon use cases need to be implemented.
number, Optional) - framerate of rendered video. Defaults to 30.
See encoders for additional namespaced settings.
MIME type. See Common MIME types
Generic quality value. For canvas capture see HTMLCanvasElement.toDataURL
Initialize a capture and flush the existing encoder state.
Add a canvas frame to an in-progress capture.
HTMLCanvasElement) - The canvas to capture.
Promise<void>- Add is an async function. The promise will resolve when the frame capture is complete.
Compile a video of the captured frames.
Promise<Blob | ArrayBuffer>- Save is an async function. The promise will resolve when the video is compiled and will contain a
ArrayBufferof the video content. See individual encoders for more details.