Skip to content
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

Closed
fippo opened this issue Oct 29, 2016 · 5 comments
Closed

replaceTrack vs setTrack #614

fippo opened this issue Oct 29, 2016 · 5 comments

Comments

@fippo
Copy link
Contributor

fippo commented Oct 29, 2016

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)

@aboba
Copy link
Contributor

aboba commented Nov 23, 2016

@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.

@aboba aboba added the wontfix label Jan 5, 2017
@aboba
Copy link
Contributor

aboba commented Jan 11, 2017

@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?).

@alvestrand
Copy link

Do you mean just leaving them with two different names, or adding both names to one of the specs?

@aboba
Copy link
Contributor

aboba commented Jan 17, 2017

@alvestrand I meant adding both names to one of the specs.

@aboba
Copy link
Contributor

aboba commented Jan 29, 2017

@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
Projects
None yet
Development

No branches or pull requests

3 participants