Bug 163202 - WebRTC: Make MediaEndpointPeerConnection handle remotely assigned mids correctly
Summary: WebRTC: Make MediaEndpointPeerConnection handle remotely assigned mids correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 143211
  Show dependency treegraph
 
Reported: 2016-10-10 02:09 PDT by Adam Bergkvist
Modified: 2016-10-10 23:41 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (18.82 KB, patch)
2016-10-10 02:45 PDT, Adam Bergkvist
no flags Details | Formatted Diff | Diff
Updated patch (18.79 KB, patch)
2016-10-10 04:55 PDT, Adam Bergkvist
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bergkvist 2016-10-10 02:09:59 PDT
An RTCRtpTransceiver has a null mid until it's been associated with a media description (with a mid) [1]. During that time, it's identified by a provisional mid that might become its real mid, but the transceiver can also get its mid assigned by a remote media description. In the second case, the mid value is initially unknown. A transceiver's RTCRtpSender must directly (synchronously in the script) provide a muted remote source that is playable by, for example, media element. This source is initially registered in the MediaEndpoint (WebRTC backend) with the transceiver's provisional mid. So, if the real mid is set by a remote description, the registered mid must be updated to preserve the association between the registered source and the transceiver.

[1] https://w3c.github.io/webrtc-pc/archives/20160913/webrtc.html#dom-rtcrtptransceiver-mid
Comment 1 Adam Bergkvist 2016-10-10 02:45:47 PDT
Created attachment 291082 [details]
Proposed patch
Comment 2 Adam Bergkvist 2016-10-10 03:40:46 PDT
Comment on attachment 291082 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291082&action=review

> LayoutTests/fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html:10
> +            let offer;

offer seems unused. Will remove in next iteration.
Comment 3 Adam Bergkvist 2016-10-10 04:55:03 PDT
Created attachment 291087 [details]
Updated patch
Comment 4 Adam Bergkvist 2016-10-10 23:19:05 PDT
Comment on attachment 291087 [details]
Updated patch

Thanks Eric
Comment 5 WebKit Commit Bot 2016-10-10 23:41:50 PDT
Comment on attachment 291087 [details]
Updated patch

Clearing flags on attachment: 291087

Committed r207052: <http://trac.webkit.org/changeset/207052>
Comment 6 WebKit Commit Bot 2016-10-10 23:41:54 PDT
All reviewed patches have been landed.  Closing bug.