W3C home > Mailing lists > Public > public-ortc@w3.org > October 2016

[ortc] replaceTrack vs setTrack

From: Philipp Hancke via GitHub <sysbot+gh@w3.org>
Date: Sat, 29 Oct 2016 15:54:53 +0000
To: public-ortc@w3.org
Message-ID: <issues.opened-186085685-1477756491-sysbot+gh@w3.org>
fippo has just created a new issue for https://github.com/w3c/ortc:

== replaceTrack vs setTrack ==
webrtc 1.0 uses RTPSender.replaceTrack to let a user replace an 
audio/video track with another MediaStreamTrack (see 
[here](http://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-replacetrack)).

ORTC has [setTrack](http://draft.ortc.org/#dom-rtcrtpsender-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](https://jsfiddle.net/an1kxpks/5/)

Please view or discuss this issue at 
https://github.com/w3c/ortc/issues/614 using your GitHub account
Received on Saturday, 29 October 2016 15:54:59 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 29 October 2016 15:55:00 UTC