MediaStream class

Media stream containing multiple tracks

Constructors

MediaStream([List<MediaStreamTrack>? tracks])
Create a new media stream
MediaStream.withId(String id, [List<MediaStreamTrack>? tracks])
Create from existing stream with ID

Properties

active bool
Whether this stream is active (has at least one non-stopped track)
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Stream ID
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addTrack(MediaStreamTrack track) → void
Add a track to the stream
clone() MediaStream
Clone this stream
getAudioTracks() List<MediaStreamTrack>
Get audio tracks only
getTrackById(String id) MediaStreamTrack?
Get track by ID
getTracks() List<MediaStreamTrack>
Get all tracks
getVideoTracks() List<MediaStreamTrack>
Get video tracks only
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeTrack(MediaStreamTrack track) bool
Remove a track from the stream
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited