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

Comments

Projects
None yet
3 participants
@fippo
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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

alvestrand commented Jan 11, 2017

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

@aboba

This comment has been minimized.

Contributor

aboba commented Jan 17, 2017

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

@aboba

This comment has been minimized.

Contributor

aboba commented Jan 29, 2017

@robin-raymond Would it make sense to add replaceTrack to ORTC?

aboba added a commit that referenced this issue Feb 17, 2017

@aboba aboba added the PR exists label Feb 17, 2017

fippo added a commit to fippo/adapter that referenced this issue Mar 19, 2017

@aboba aboba closed this Apr 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment