replaceTrack vs setTrack #614
Closed
Comments
@fippo WEBRTC WG felt that replaceTrack was a better name than setTrack so, it was changed, after setTrack had been implemented in Edge. Since replaceTrack has now been implemented in Firefox, the prospects for convergence are probably not very high. |
@fippo @robin-raymond @alvestrand It is somewhat depressing, but at this point, I assume that aliasing is the right approach to this. Do we need to say something in the spec (such as apologizing?). |
Do you mean just leaving them with two different names, or adding both names to one of the specs? |
@alvestrand I meant adding both names to one of the specs. |
@robin-raymond Would it make sense to add replaceTrack to ORTC? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
The text was updated successfully, but these errors were encountered: