Player input from webcam video

Hierarchy

  • Webcam

Implements

Constructors

Accessors

Methods

Constructors

Accessors

  • get active(): boolean
  • Specifies if the webcam is currently active.

    The webcam is considered active if it has been started and has not been stopped afterwards

    Returns boolean

Methods

  • Manually starts webcam

    Ordinary webcam is lazily started during async iteration over it.

    But sometimes you may want to manually pre-start webcam e.g during parallel creation of a Player instance:

    const [webcam, player] = await Promise.all([
    new Webcam().start(),
    Player.create({ clientToken: "xxx-xxx-xxx" }),
    ])

    player.use(webcam)

    Returns Promise<Webcam>

  • Turns off webcam

    Returns void