VideoProcessor
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
status | readonly | | "closed" | "closing" | "Error" | "destroyed" | "destroying" | "idle" | "new" | "opened" | "opening" | "processing" | "updated" | "updating" | - |
process | public | (source) => Promise<MediaStreamTrack> | Process the video and return a MediaStream |
destroy | public | () => Promise<void> | Destroy the segmentation wasm instance |
renderOptions | readonly | RendererOptions | Current renderer options |
processingWidth | readonly | number | Current processing width |
processingHeight | readonly | number | Current processing height |
Methods
open()
open(options?): Promise<void>;
Initialize the video processor and related
Parameters
| Parameter | Type |
|---|---|
options? | ProcessorUpdateOptions |
Returns
Promise<void>
update()
update(options): Promise<void>;
Update the video processor with provided options
Parameters
| Parameter | Type |
|---|---|
options | ProcessorUpdateOptions |
Returns
Promise<void>
mute()
mute(muted): void;
Parameters
| Parameter | Type |
|---|---|
muted | boolean |
Returns
void
close()
close(): Promise<void>;
Stop the process of video segmentation
Returns
Promise<void>