WEBRTC demo in the browser

Source: Internet
Author: User

WEBRTC in the Chrome browser demo Many examples, WebRTC source, but in the Firefox browser, the example can not be used, the information on the web said to set the media.peerconnection.enabled to True, However, in the Firefox browser, the default value is True, using the WEBRTC example in Firefox or can not capture local video.

Here are the examples found online:

Firefox Demo WEBRTC's website: http://conversat.io/

The most critical thing is to simplewebrtc.js this script.


Simplewebrtc.js encapsulates WebRTC Technology's JavaScript to help you simplify WebRTC application development.

Example code:

1 var webrtc =new WebRTC ({
2 The id/element DOM element that would hold "our" video
3 Localvideoel: ' Localvideo ',
4 The id/element DOM element that would hold the remote videos
5 Remotevideosel: ' Remotesvideos ',
6 Immediately ask for camera access
7 Autorequestmedia:true
8 });


Conversat.io is a voice group chat app. You only need to log in with a browser that supports WEBRTC, set up a chat room, and then you can have a video chat with up to 6 people-no landing, no other services, only video chat.

Currently, there are only two browsers that support the WEBRTC component running Conversat.io,chrome and the nightly version of Firefox (you need to go to Firefox about: Config enable media.peerconnection.enabled personalization, in fact no need, default this option is already true) Conversat.io is a very cool demonstration, WEBRTC is in the initial stage, sometimes the application is more tricky, so, The new library was later introduced.

As Henrik Joreteg wrote on the hacks blog, "There are two goals for Conversat.io, one is an important communication tool ... Second, he is a simplewebrtc.js library and a small signaling server running the demo, Signelmaster. ”

As part of the WEBRTC package, these two tools are designed to simplify the writing process of WEBRTC applications-such as WEBRTC jquery. Two libraries are open source (MIT licensed) and constantly perfected and evolved on GitHub.

If you want to learn more about SIMPLEWEBRTC and signalmaster, and see more code, see Mozilla Hacks Blog for more details.

What we can do if there are millions of eight cores and even more nuclear mobile devices. Instead of thinking about WEBRTC, this technique can actually implement point-to-point in the browser. You might as well look at Peerjs and simplewebrtc.js. In my opinion, we seem to be able to put the expensive backend servers aside and explore a sustainable computing model that uses mobile device collaboration.

http://blog.csdn.net/langeldep/article/details/8787120


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.