Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoProcessor Abstract

The parent class of all source video stream processors.

Note: Only available in the video processor worker.

Hierarchy

  • VideoProcessor

Index

Constructors

  • constructor

    Parameters

    • port: MessagePort

      message port

    • Optional options: any

      customised options

    Returns VideoProcessor

Properties

port: MessagePort

The communication port used for messaging between the processor and the main thread.

Methods

  • getOutput(): any
  • Function to retrieve an OffscreenCanvas that renders the current output frame or processed result.

    Returns any

  • onInit(): void
  • Callback triggered during the initialization of the processor.

    Returns void

  • onUninit(): void
  • Callback triggered during the uninitialization of the processor.

    Returns void

  • processFrame(input: VideoFrame, output: OffscreenCanvas): boolean | Promise<boolean>
  • Processes a video frame and optionally applies effects or modifications.

    Parameters

    • input: VideoFrame
    • output: OffscreenCanvas

    Returns boolean | Promise<boolean>