W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > July 2017

Re: [webrtc-pc] does MSID still work? (was: example 13: getReceivers semantics)

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Thu, 13 Jul 2017 03:17:30 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-314959044-1499915849-sysbot+gh@w3.org>
@markandrus The track ids in the SDP won't match those in the menu. Switch out the ids for mids:

```js
  const renamer = (o, f) => Object.keys(o).reduce((o,k) => (o[f(k)] = menu[k], o), {});

  await pc.setLocalDescription(await pc.createOffer());
  menu = renamer(menu, id => pc.getTransceivers().find(t => t.sender.track.id == id).mid);
  sc.send({menu});
  sc.send({sdp: pc.localDescription});
````


-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1128#issuecomment-314959044 using your GitHub account
Received on Thursday, 13 July 2017 03:17:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:40 UTC