Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

replaceTrack vs setTrack #614

@fippo

Description

@fippo

webrtc 1.0 uses RTPSender.replaceTrack to let a user replace an audio/video track with another MediaStreamTrack (see here).

ORTC has setTrack for the same purpose.

From a shim perspective I'd slightly prefer a uniform naming. However, I can easily add an alias by setting RTCRtpSender.prototype.replaceTrack = RTCRtpSender.prototype.setTrack;
as shown in this fiddle (works best in Edge or Firefox)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions