-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replaceTrack vs setTrack #614
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? |
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: