Firefox Tomorrow

web api instance method

MediaStream: addTrack() method

View on MDN ↗

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

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