web api instance method
MediaStream: addTrack() method
The addTrack() method of the MediaStream interface adds a new track to the
stream. The track is specified as a parameter of type MediaStreamTrack.
[!NOTE] If the specified track is already in the stream’s track set, this method has no effect.
Syntax
addTrack(track)
Parameters
track- : A
MediaStreamTrackto add to the stream.
- : A
Return value
None (undefined).
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
MediaStream, the interface it belongs to.