Re: replaceTrack proposal

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