web rtc sample

Testing WebRTC on Chrome

Contents

  1. 1 getUserMedia
  2. 2 The Peer Connection Flag
  3. 3 Installing a WebRTC enabled Chrome for Mac / Windows / Linux
    1. 3.1 Mac
    2. 3.2 Windows
    3. 3.3 Linux
  4. 4 Demos

getUserMedia

The getUserMedia API lets users grant web apps access to their camera and microphone without a plug-in. This API is now available in Chrome Stable (as of version 21) without the need for any flag.

It has also been tested on Chrome Frame for Internet Explorer users.

The Peer Connection Flag

You can enable WebRTC by enabling the PeerConnection experiment on both Chrome Canary and Dev Channel. Please remember that enabling the flags will keep the feature on until you disable it. 

WebRTC features may change, break, or disappear at any time. We make absolutely no guarantees about what may happen if you turn on this experiment, and your browser may even spontaneously combust. Jokes aside, your browser may delete all your data, or your security and privacy could be compromised in unexpected ways. Enabling WebRTC will enable it for  all users of this browser. Please proceed with caution.

Installing a WebRTC enabled Chrome for Mac / Windows / Linux

Mac

Download a canary build from: http://tools.google.com/dlpage/chromesxs

--or--

Download the Chrome Dev Channel build for Mac OS X.
Install it into Applications as suggested when mounting the .dmg

To enable WebRTC once, from the command line, you will need to run Chrome from terminal.
open -a "/Applications/Google Chrome Canary.app" --args --enable-peer-connection

To keep it WebRTC enabled, you will need to go this address: chrome://flags , Enable the PeerConnection experiments and relaunch as pictured above.

Windows

Download and install canary build from: http://tools.google.com/dlpage/chromesxs

-- or -- 

Download the Chrome Dev Channel build for Windows.

Installer will create a shortcut on your Desktop to the canary build, create another shortcut to that shortcut.
Right-click on the new shortcut,  select properties.
In Target: add --enable-peer-connection at the end (after the quotes).

Click OK and double-click the shortcut to launch Chrome Canary with WebRTC enabled.

To keep it WebRTC enabled, you will need to go this address: chrome://flags , Enable the PeerConnection experiment and relaunch as pictured above.

Linux

There isn't a published canary build for Chrome. You can compile Chromium yourself.
Alternatively, you can install the dev channel from https://sites.google.com/a/chromium.org/dev/getting-involved/dev-channel; this requires you to install the dev channel version in place of your current Chrome installation.

To build your own Chromium browser:
Follow the instructions from http://www.chromium.org/developers/how-tos/get-the-code

Run from a terminal in your source directory: src/out/Debug/chrome --enable-peer-connection --user-data-dir=

If you don't feel like building Chrome, the Dev Channel instructions are here.

To keep it WebRTC enabled, you will need to go this address:  chrome://flags , Enable the PeerConnection experiments and relaunch as pictured above.

Demos

Here are a couple of demo sites. Most of them were sent to us via the discuss-webrtc list. Please remember that the same disclaimer as above applies:
  • Justin Uberti (Chrome-webrtc team member) has sent in a App Engine based 1:1 video calling app. http://apprtc.appspot.com/ source code: http://code.google.com/p/webrtc-samples/source/browse/trunk/apprtc/
  • Justin Uberti (Chrome-webrtc team member) has sent in a App Engine based face detection app http://apprtc.appspot.com/html/face.html
  • Paul Neave sent in a great video effects app.  http://neave.com/webcam/html5/
  • Greg Miernicki was officially the first to send in a demo: http://miernicki.com/cam.html
  • Eric Bidelman sent in an additional photo effects demos: http://html5-demos.appspot.com/static/getusermedia/photobooth.html
  • And another let's have fun with WebGL sent in by Jérome Étienne: http://webglmeeting.appspot.com
  • An HTML5 SIP client http://www.sipml5.org/call.htm
If you find another demo app, please send it to [email protected] / the discuss list or our Google+ Page. We will try to put it up!

你可能感兴趣的:(html)