W3C home > Mailing lists > Public > public-webrtc@w3.org > April 2015

Re: replaceTrack proposal

From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 14 Apr 2015 13:56:32 -0700
Message-ID: <CABkgnnVnV5BaqFCakc146W+gJi0uDUvW=N8C=i43EkWkG4q-cg@mail.gmail.com>
To: Erik Lagerway <erik@hookflash.com>
Cc: Peter Thatcher <pthatcher@google.com>, Jan-Ivar Bruaroey <jib@mozilla.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 14 April 2015 at 13:40, Erik Lagerway <erik@hookflash.com> wrote:
>> 1.  Why not just setTrack instead of replaceTrack?  I don't mean to
>> bikeshed, but we have lots of setters in the code, and no "replacers"
>> in the API.
>
>
> +1
>
> In addition to Peter's comments, there are at least a few implementations
> elsewhere that are well along now using setTrack. For us, changing it to
> replaceTrack now would introduce a lot of work.

I don't mean to be rude, but that's a bad reason to pick the wrong name.

If setTrack() was an acceptable name, then we would be better off with:

  sender.track = theReplacement;

As I understand it, replaceTrack can fail, asynchronously, if the
underlying track is incapable of producing a compatible RTP stream.
That might not be the case in current implementations, but those
implementations are probably not using encoding cameras that can't
change codecs.
Received on Tuesday, 14 April 2015 20:56:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:43 UTC