Type alias InitConstraints
InitConstraints: MediaStreamConstraints | ((supportedConstraints) => MediaStreamConstraints | Promise<MediaStreamConstraints>)
Type declaration
- (supportedConstraints): MediaStreamConstraints | Promise<MediaStreamConstraints>
Parameters
- supportedConstraints: MediaTrackSupportedConstraints
Returns MediaStreamConstraints | Promise<MediaStreamConstraints>
Media stream constraints for initialization.
This can either be a standard
MediaStreamConstraintsobject or a function that returnsMediaStreamConstraints. The function is provided with an argument,MediaTrackSupportedConstraints, which represents constraints supported by the user agent, and should return eitherMediaStreamConstraintsor a promise that resolves to it.Note that
MediaTrackSupportedConstraintsdoesn't reflect the constraints supported by the device. It only provides information about which constraint can be understood by the user agent.MediaStreamConstraintsMediaTrackSupportedConstraints