WebRTC: Difference between revisions
| (2 intermediate revisions by the same user not shown) | |||
| Line 39: | Line 39: | ||
Next the local and remote clients exchange descriptions: | Next the local and remote clients exchange descriptions: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
const localOffer = await localConnection.createOffer(); | const localOffer = await localConnection.createOffer(); | ||
| Line 57: | Line 56: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Note that both clients can continue to update descriptions as the network updates. | |||
*: As long as the signalling is setup correctly, you don't need to worry about what RTCPeerConnection is doing under the hood. | |||
{{ hidden | RTCPeerConnection Example | | {{ hidden | RTCPeerConnection Example | | ||
| Line 158: | Line 159: | ||
==JavaScript API== | ==JavaScript API== | ||
===Multiple Clients=== | |||
To handle multiple clients, you simply have one RTCPeerConnection per client. | |||
==Native APIs (C++)== | ==Native APIs (C++)== | ||
| Line 164: | Line 167: | ||
* [https://www.html5rocks.com/en/tutorials/webrtc/basics/ HTML5Rocks: Getting Started with WebRTC (JS)] | * [https://www.html5rocks.com/en/tutorials/webrtc/basics/ HTML5Rocks: Getting Started with WebRTC (JS)] | ||
* [https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample MDN Simple RTCDataChannel sample] | * [https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample MDN Simple RTCDataChannel sample] | ||
* [https://news.ycombinator.com/item?id=25933016 HackerNews: WebRTC is now a W3C and IETF standard] | |||
==References== | ==References== | ||