The frame rate of the source in the VideoFrameBuffer.
The height in pixels of the source in the VideoFrameBuffer.
The width in pixels of the source in the VideoFrameBuffer.
Returns HTMLCanvasElement
or OffscreenCanvas
if the internal source can be transformed into one. Optional method.
Returns null
if the buffer is destroyed.
Returns the buffer as CanvasImageSource
which can be drawn on HTMLCanvasElement directly.
If destroy
is already called, asCanvasImageSource
should reject.
Returns [[Transferable]] if the internal source can be transformed into one. Optional method.
If destroy
is already called, asTransferable
should reject.
Explicitly destroys the source and intermediate buffers in VideoFrameBuffer.
After destroy
is called, this VideoFrameBuffer must be discarded.
destroy
is typically required to be called, when MediaStream
, HTMLVideoElement
and ImageData
are passed in as initialization data.
Generated using TypeDoc
VideoFrameBuffer is an interface that can be used as input or output with VideoFrameProcessor. It must implement the method to return buffer as
CanvasImageSource
but the internal handle to the video frame buffer can be flexible.