locar
    Preparing search index...

    Class Webcam

    Class to setup the webcam.

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a Webcam.

      Parameters

      • constraints: { video: { facingMode: string } } = ...

        {Object} - options to use for initialising the camera. This is the same constraints object as used by standard MediaDevices API.

      • OptionalvideoElementSelector: string

        selector to obtain the HTML video element to render the webcam feed. If a falsy value (e.g. null or undefined), a video element will be created.

      Returns Webcam

    Properties

    eventHandlers: Record<string, ((...args: any[]) => void)[]>
    sceneWebcam: Scene

    Methods

    • Remove an event handler.

      Parameters

      • eventName: string

        the event to remove a handler from.

      • eventHandler: (...args: any[]) => void

        the event handler function to remove.

      Returns void

    • Add an event handler.

      Parameters

      • eventName: string

        the event to handle.

      • eventHandler: (...args: any[]) => void

        the event handler function.

      Returns void