Success & Failure Callbacks in RTCRtpSender.setTrack #148

Closed
aboba opened this Issue Sep 3, 2014 · 4 comments

Projects

None yet

2 participants

@aboba
Contributor
aboba commented Sep 3, 2014

Mozilla proposal for RTCRtpSender.replaceTrack method:
http://lists.w3.org/Archives/Public/public-webrtc/2014Sep/0001.html

Difference from RTCRtpSender.setTrack is use of a success and failure callback.

@robin-raymond robin-raymond added the 1.1 label Sep 25, 2014
@robin-raymond robin-raymond pushed a commit to robin-raymond/ortc that referenced this issue Oct 14, 2014
Robin Raymond Address questions about RTCDtlsTransport.start(), as noted in: Issue #…
…146

Address questions about RTCRtpCodecCapability.preferredPayloadType, as noted in: Issue #147
Address questions about RTCRtpSender.setTrack() error handling, as noted in: Issue #148
Partially address 'automatic' use of scalable video coding (in RTCRtpReceiver.receive()) as noted in: Issue #149
Renamed RTCIceListener to RTCIceGatherer as noted in: Issue #150
Added text on multiplexing of STUN, TURN, DTLS and RTP/RTCP, as noted in: Issue #151
Address issue with queueing of candidate events within the RTCIceGatherer, as noted in: Issue #152
Clarify behavior of RTCRtpReceiver.getCapabilities(kind), as noted in: Issue #153
7a48e0b
@aboba aboba added the 1.0 label Nov 21, 2014
@aboba aboba removed the 1.1 label Dec 11, 2014
@aboba
Contributor
aboba commented Apr 15, 2015

WebRTC 1.0 PR for replaceTrack:
w3c/webrtc-pc#195

@aboba
Contributor
aboba commented Apr 19, 2015

Proposal is to change setTrack to a Promise for consistency with WebRTC 1.0.

@aboba
Contributor
aboba commented Apr 20, 2015

Here is the proposed replacement text in Section 6.3.2:

setTrack
Attempts to replace the track being sent with another track provided.

When the setTrack() method is invoked, the user agent must run the following steps:

Let p be a new promise.

Let withTrack be the argument to this method.

Run the following steps asynchronously:

If withTrack.kind differs from RTCRtpSender.track.kind or if withTrack has different peerIdentity constraints, then reject p with IncompatibleMediaStreamTrackError and abort these steps.

Set the RTCRtpSender.track attribute to withTrack, and have the sender seamlessly switch to transmitting withTrack in place of what it is sending. On the remote receiving end, the track maintains its existing grouping and id until the connection ends.
Parameter Type Nullable Optional Description
track MediaStreamTrack ✘ ✘
Return type: Promise

@robin-raymond robin-raymond pushed a commit that referenced this issue May 7, 2015
Robin Raymond - sender.setTrack() updated to return a Promise, as noted in:
#148

- Clarified handling of incoming connectivity checks prior to calling iceTransport.start(), as noted in:
#170

- Clarified handling of incoming DTLS packets, as noted in:
#173

- Added RTCIceGatherer as an optional argument to the RTCIceTransport constructor, as noted in:
#174

- Clarified handling of contradictory RTP/RTCP multiplexing settings, as noted in:
#185

- Clarified error handling relating to RTCIceTransport, RTCDtlsTransport and RTCIceGatherer objects in the "closed" state, as noted in:
#186

- Added component method and createAssociatedGatherer() method to the RTCIceGatherer object, as noted in:
#188

- Added close() method to the RTCIceGatherer object as noted in:
#189

- Clarified behavior of TCP candidate types, as noted in:
#190

- Clarified behavior of iceGatherer.onlocalcandidate, as noted in:
#191

- Updated terminology in Section 1.1 as noted in:
#193

- Updated RTCDtlsTransportState definitions, as noted in:
#194

- Updated RTCIceTransportState definitions, as noted in:
#197
c006197
@aboba aboba closed this May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment