admin管理员组

文章数量:1293512

So I found this W3 article on WebRTC while looking for a way to make a video chatting program that works pletely in browser without plugins (and noted that the MediaStream seems to only work in Chrome as far as I know).

My question is fairly simple for those who are familiar with this API. All I want to know is where can I find documentation that has example code for a client using this API, or if that doesn't exist, can you provide a working example under the current specifications? Either a demo, or just some "simple" code to connect to a STUN server and demonstrate basic functionality of this API.

Please note that I am not asking for a deprecated client. For example, webkitPeerConnection is deprecated, while webkitRTCPeerConnection as specified in the link, is now the current constructor.

So I found this W3 article on WebRTC while looking for a way to make a video chatting program that works pletely in browser without plugins (and noted that the MediaStream seems to only work in Chrome as far as I know).

My question is fairly simple for those who are familiar with this API. All I want to know is where can I find documentation that has example code for a client using this API, or if that doesn't exist, can you provide a working example under the current specifications? Either a demo, or just some "simple" code to connect to a STUN server and demonstrate basic functionality of this API.

Please note that I am not asking for a deprecated client. For example, webkitPeerConnection is deprecated, while webkitRTCPeerConnection as specified in the link, is now the current constructor.

Share Improve this question asked Dec 15, 2012 at 8:51 Patrick RobertsPatrick Roberts 52k10 gold badges117 silver badges162 bronze badges 3
  • Here is a demo 100% client side: webrtc-experiment.appspot. -- code is also available (github./muaz-khan/WebRTC-Experiment) ....You JUST need to know JavaScript and that's it!....for documentation: IETF RTCWeb drafts are super awesome (tools.ietf/wg/rtcweb) .... webrtc is a good site! – Muaz Khan Commented Dec 15, 2012 at 10:03
  • Not trying to be difficult or offensive, but could you make an answer on here, and include only code relevant to my question? The code in your client you created is quite impressive, but rather messy as the entire client is written in the html file rather than in separate, organized js files. I'd rather not attempt to find what I'm looking for. This may be because I am not familiar with "pubnub." Is it some sort of wrapper for WebSockets? If that's the case, I prefer to use socket.io because the syntax is much more developer-friendly in my humble opinion. – Patrick Roberts Commented Dec 15, 2012 at 10:26
  • Though I've not tested the code at this page: sites.google./site/muazkh/webrtc-order-the-code however may help you. – Muaz Khan Commented Dec 16, 2012 at 9:41
Add a ment  | 

1 Answer 1

Reset to default 9

I've created a guide to resources: Getting Started With WebRTC.

I've also updated the WebRTC article on HTML5 Rocks.

Above all, I'd remend reading through the simple RTCPeerCconnection example in the W3C Editor's Draft. This gives a plete but prehensible outline of RTCPeerConnection, including signalling.

Signalling is the process of exchanging session control messages, network and media information. From a JavaScript perspective, this is probably the hardest part of WebRTC to understand, and the most important to get to grips with.

webkitRTCPeerConnection is the name of the implementation now in Chrome. The prefix will be removed once the standardisation process has stabilised.

MediaStream is implemented in Chrome, Opera and Firefox: see the cross platform example at simpl.info/gum.

本文标签: javascriptCan someone explain the WebRTC API DocumentationStack Overflow