mediacapture_streams library Null safety
Media Capture and Streams
The dictionary is used to define a range of permitted
double-precision floating-point values for a property, with
either or both a maximum and minimum value specified. The
ConstrainDoubledictionary is based on this, augmenting it to support exact and ideal values as well.
- The interface of the Media Streams API gives access to the capabilities of the input device that it represents. [...]
The interface contains information that describes a single media
input or output device. The list of devices obtained by calling
navigator.mediaDevices.enumerateDevices()is an array of objects, one per media device.
- The interface provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data.
- The interface represents a stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.You can obtain a MediaStream object either by using the constructor or by calling MediaDevices.getUserMedia(). [...]
The dictionary is used when calling
getUserMedia()to specify what kinds of tracks should be included in the returned MediaStream, and, optionally, to establish constraints for those tracks' settings. [...]
- The interface represents a single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
- The interface represents events which indicate that a MediaStream has had tracks added to or removed from the stream through calls to Media Stream API methods. These events are sent to the stream when these changes occur. [...]
The dictionary is used to describe a set of capabilities and the
value or values each can take on. A constraints dictionary is
applyConstraints()to allow a script to establish a set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling
The dictionary is used to return the current values configured
for each of a MediaStreamTrack's settings. These values will
adhere as closely as possible to any constraints previously
described using a MediaTrackConstraints object and set using
applyConstraints(), and will adhere to the default constraints for any properties whose constraints haven't been changed, or whose customized constraints couldn't be matched. [...]
- The dictionary establishes the list of constrainable properties recognized by the user agent or browser in its implementation of the MediaStreamTrack object. An object conforming to is returned by MediaDevices.getSupportedConstraints(). [...]
- Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers. Experimental This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface of the Media Capture and Streams API indicates that the set of desired capabilities for the current MediaStreamTrack cannot currently be met. When this event is thrown on a MediaStreamTrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
- The dictionary is used to define a range of permitted integer values for a property, with either or both a maximum and minimum value specified. The ConstrainULongRange dictionary is based on this, augmenting it to support exact and ideal values as well.