Interface UseUserMediaStreamOptions

Configuration options for the UserMediaStream object, including constraints for initialization, video, and audio tracks, a timeout for capability retrieval, and callbacks for stream lifecycle events.

interface UseUserMediaStreamOptions {
    audioConstraints?: AudioConstraints;
    getCapabilitiesTimeout?: number;
    initConstraints?: InitConstraints;
    onStreamInspect?: ((streamCapablities?) => unknown);
    onStreamStart?: ((stream) => unknown);
    onStreamStop?: (() => unknown);
    onStreamUpdate?: ((stream) => unknown);
    streaming?: boolean;
    videoConstraints?: VideoConstraints;
}

Hierarchy (view full)

Properties

audioConstraints?: AudioConstraints

Media track constraints specific to audio tracks.

getCapabilitiesTimeout?: number

The default maximum time (in milliseconds) to wait for getting the capabilities of a media track.

initConstraints?: InitConstraints

Media stream constraints for initialization.

onStreamInspect?: ((streamCapablities?) => unknown)

Callback function that is triggered when the stream is inspected.

Type declaration

    • (streamCapablities?): unknown
    • Callback function that is triggered when the stream is inspected.

      Parameters

      Returns unknown

Param: streamCapablities

User media stream capabilities

onStreamStart?: ((stream) => unknown)

Callback function that is triggered when the stream starts.

Type declaration

    • (stream): unknown
    • Callback function that is triggered when the stream starts.

      Parameters

      • stream: MediaStream

        Media stream

      Returns unknown

Param: stream

Media stream

onStreamStop?: (() => unknown)

Callback function that is triggered when the stream stops.

Type declaration

    • (): unknown
    • Callback function that is triggered when the stream stops.

      Returns unknown

onStreamUpdate?: ((stream) => unknown)

Callback function that is triggered on each application of constraints.

Type declaration

    • (stream): unknown
    • Callback function that is triggered on each application of constraints.

      Parameters

      • stream: MediaStream

        Media stream

      Returns unknown

Param: stream

Media stream

streaming?: boolean

control the activation of streaming

videoConstraints?: VideoConstraints

Media track constraints specific to video tracks.

Generated using TypeDoc