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: Wed, 12 Jul 2017 20:10:39 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-314882627-1499890237-sysbot+gh@w3.org>
@markandrus That works, I guess, assuming you never have more than one video and one audio track per stream, though you'd still run the risk of (rare, theoretical) stream `id` collisions.

But note that `transceiver.mid` is set by both [`setLocalDescription` and `setRemoteDescription`](http://w3c.github.io/webrtc-pc/#set-description).

The [recommended](http://w3c.github.io/webrtc-pc/#simple-peer-to-peer-example) time to send signaling these days is *after* `setLocalDescription` ([tab-demo](https://jsfiddle.net/jib1/80xcgwmc/)), e.g.:
```js
  await pc.setLocalDescription(await pc.createOffer());
  // pc.getTransceivers()[0].mid is available here! <---
  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-314882627 using your GitHub account
Received on Wednesday, 12 July 2017 20:10:45 UTC

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