Type alias InitConstraints

InitConstraints: MediaStreamConstraints | ((supportedConstraints) => MediaStreamConstraints | Promise<MediaStreamConstraints>)

Media stream constraints for initialization.

This can either be a standard MediaStreamConstraints object or a function that returns MediaStreamConstraints. The function is provided with an argument, MediaTrackSupportedConstraints, which represents constraints supported by the user agent, and should return either MediaStreamConstraints or a promise that resolves to it.

Note that MediaTrackSupportedConstraints doesn't reflect the constraints supported by the device. It only provides information about which constraint can be understood by the user agent.

Type declaration

    • (supportedConstraints): MediaStreamConstraints | Promise<MediaStreamConstraints>
    • Parameters

      • supportedConstraints: MediaTrackSupportedConstraints

      Returns MediaStreamConstraints | Promise<MediaStreamConstraints>

Generated using TypeDoc