Options
All
  • Public
  • Public/Protected
  • All
Menu

General interface for any video capture subsystem, user-implementable.

Events:

  • data(VideoFrame): A video frame is available.

Hierarchy

Index

Constructors

constructor

Properties

Optional VideoFrame

VideoFrame?: typeof VideoFrame

VideoFrame type to be used by captured frame, set by the user, but restricted by certain capture types.

Methods

Abstract close

  • close(): void
  • Stop this video capture and remove any underlying data.

    Returns void

emitEvent

  • emitEvent(ev: string, arg: any): void
  • Emit this event.

    Parameters

    • ev: string

      Event name to emit.

    • arg: any

      Argument to the event handler(s).

    Returns void

Abstract getFramerate

  • getFramerate(): number

Abstract getHeight

  • getHeight(): number
  • Get the height of video frames from this capture.

    Returns number

Abstract getWidth

  • getWidth(): number

off

on

  • Set an event handler.

    Parameters

    • ev: string

      Event name, or "*" for all events.

    • handler: EventHandler

      Event handler for this event.

    Returns void

once

  • Set a one-time event handler.

    Parameters

    • ev: string

      Event name, or "*" for all events.

    • handler: EventHandler

      Event handler for this event.

    Returns void

tee

  • "Tee" this capture into the number of receivers specified.

    Parameters

    • ct: number

      Number of duplicates to make.

    Returns VideoCapture[]

Generated using TypeDoc