WebRTC: RTCDataChannel demo, API changes... and Chrome talks to Firefox! | Web | ...
More good news from our old friend WebRTC...
To be precise: three pieces of good news and a couple of minor API changes.
RTCDataChannel for Chrome
RTCDataChannel has been implemented in Chrome, and there's a great little demo at simpl.info/dc.
RTCDataChannel makes the most of features built into RTCPeerConnection – not least, the use if the ICE framework to get through firewalls and NATs – and has lots of potential applications where low latency is paramount: for gaming, remote desktop applications, real-time text chat and file transfer.
For more information about RTCDataChannel, take a look at Getting Started with WebRTC.
Less exciting, but still important: from Chrome 26, some RTCPeerConnection and MediaStream API properties have become getter methods:
- MediaStream now has the
getAudioTracks()method instead of the audioTracks property, and
- RTCPeerConnection now has
To get a glimpse of MediaStream in action, take a look at the simpl.info/gum
getUserMedia demo. The
stream variable is in global scope: examine it from the console. Likewise for RTCPeerConnection at simpl.info/pc: the RTCPeerConnection objects
pc2 are in global scope.
Chrome <=> Firefox
You can try this out now at webrtc.org/demo, which has full instructions, links to source code, and information about API differences.
Tip of the hat to those at Mozilla and Google who made it all happen.
Happy coding! And please let us know of any bugs, either by commenting on this post, or at crbug.com/new.
...and don't forget, you can always get up-to-date implementation information from the excellent chromestatus.com.