forked from webrtc/apprtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jiayang Liu
committed
Feb 3, 2015
1 parent
9e9a05c
commit 6644b0e
Showing
210 changed files
with
167 additions
and
11,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
|
||
install: | ||
- npm install -g bower grunt grunt-cli | ||
- npm install grunt-jscs grunt-contrib-jshint grunt-htmlhint grunt-contrib-csslint | ||
- npm install grunt-jinja grunt-jscs grunt-shell grunt-jstestdriver-phantomjs grunt-closurecompiler | ||
|
||
script: | ||
- grunt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,63 @@ | ||
[](https://travis-ci.org/GoogleChrome/webrtc) | ||
# AppRTC Demo Code | ||
|
||
# WebRTC code samples # | ||
## Development | ||
|
||
This is a repository for client-side WebRTC code samples and the [AppRTC](https://apprtc.appspot.com) video chat client. | ||
Detailed information on devloping in the [GoogleChrome/webrtc](https://github.com/GoogleChrome/webrtc) github repo can be found in the [WebRTC GitHub repo developer's guide](https://docs.google.com/document/d/1tn1t6LW2ffzGuYTK3366w1fhTkkzsSvHsBnOHoDfRzY/edit?pli=1#heading=h.e3366rrgmkdk). | ||
|
||
Some of the samples use new browser features. They may only work in Chrome Canary and/or Firefox Beta, and may require flags to be set. | ||
The development AppRTC server can be accessed by visiting [http://localhost:8080](http://localhost:8080). | ||
|
||
All of the samples use [adapter.js](https://github.com/GoogleChrome/webrtc/blob/master/samples/web/js/adapter.js), a shim to insulate apps from spec changes and prefix differences. In fact, the standards and protocols used for WebRTC implementations are highly stable, and there are only a few prefixed names. For full interop information, see [webrtc.org/web-apis/interop](http://www.webrtc.org/web-apis/interop). | ||
Running AppRTC locally requires the [Google App Engine SDK for Python](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python) and [Grunt](http://gruntjs.com/). | ||
|
||
NB: all samples that use `getUserMedia()` must be run from a server. Calling `getUserMedia()` from a file:// URL will result in a PermissionDeniedError NavigatorUserMediaError. | ||
Detailed instructions for running on Ubuntu Linux are provided below. | ||
|
||
[webrtc.org/testing](http://www.webrtc.org/testing) lists command line flags useful for development and testing with Chrome. | ||
### Running on Ubuntu Linux | ||
|
||
For more information about WebRTC, we maintain a list of [WebRTC Resources](https://docs.google.com/document/d/1idl_NYQhllFEFqkGQOLv8KBK8M3EVzyvxnKkHl4SuM8/edit). If you've never worked with WebRTC, we recommend you start with the 2013 Google I/O [WebRTC presentation](http://www.youtube.com/watch?v=p2HzZkd2A40). | ||
Install grunt by first installing [npm](https://www.npmjs.com/), | ||
|
||
Patches and issues welcome! See [CONTRIBUTING](https://github.com/GoogleChrome/webrtc/blob/master/CONTRIBUTING.md) for instructions. All contributors must sign a contributor license agreement before code can be accepted. Please complete the agreement for an [individual](https://developers.google.com/open-source/cla/individual) or a [corporation](https://developers.google.com/open-source/cla/corporate) as appropriate. The [Developer's Guide](https://bit.ly/webrtcdevguide) for this repo has more information about code style, structure and validation. | ||
``` | ||
sudo apt-get install npm | ||
``` | ||
|
||
## The demos ## | ||
On Ubuntu 14.04 the default packages installs `/usr/bin/nodejs` but the `/usr/bin/node` executable is required for grunt. You can add this by installing the `nodejs-legacy` package, | ||
|
||
### getUserMedia ### | ||
``` | ||
sudo apt-get install nodejs-legacy | ||
``` | ||
|
||
[Basic getUserMedia demo](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/gum) | ||
It is easiest to install a shared version of `grunt-cli` from `npm` using the `-g` flag. This will allow you access the `grunt` command from `/usr/local/bin`. More information can be found on [`gruntjs` Getting Started](http://gruntjs.com/getting-started). | ||
|
||
[getUserMedia + canvas](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/canvas) | ||
``` | ||
sudo npm -g install grunt-cli | ||
``` | ||
|
||
[getUserMedia + canvas + CSS Filters](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/filter) | ||
*Omitting the `-g` flag will install `grunt-cli` to the current directory under the `node_modules` directory.* | ||
|
||
[getUserMedia with resolution constraints](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/resolution) | ||
Finally, you will want to install grunt and required grunt dependencies. *This can be done from any directory under your checkout of the [GoogleChrome/webrtc](https://github.com/GoogleChrome/webrtc) repository.* | ||
|
||
[getUserMedia with camera/mic selection](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/source) | ||
``` | ||
npm install | ||
``` | ||
|
||
[Audio-only getUserMedia output to local audio element](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/audio) | ||
Before you start the AppRTC dev server and *everytime you update the javascript* you need to recompile the App Engine package by running, | ||
|
||
[Audio-only getUserMedia displaying volume](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/volume) | ||
``` | ||
grunt build | ||
``` | ||
|
||
[Face tracking](https://googlechrome.github.io/webrtc/samples/web/content/getusermedia/face) | ||
Start the AppRTC dev server from the `out/app_engine` directory by running the Google App Engine SDK dev server, | ||
|
||
### RTCPeerConnection ### | ||
``` | ||
<path to sdk>/dev_appserver.py ./out/app_engine | ||
``` | ||
|
||
[Basic peer connection](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/pc1) | ||
### Testing | ||
|
||
[Audio-only peer connection](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/audio) | ||
All tests by running `grunt`. | ||
|
||
[Multiple peer connections at once](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/multiple) | ||
To run only the Python tests you can call, | ||
|
||
[Forward output of one peer connection into another](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/multiple-relay) | ||
|
||
[Munge SDP parameters](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/munge-sdp) | ||
|
||
[Use pranswer when setting up a peer connection](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/pr-answer) | ||
|
||
[Adjust constraints, view stats](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/constraints) | ||
|
||
[Display createOffer output](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/create-offer) | ||
|
||
[Use RTCDTMFSender](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/dtmf) | ||
|
||
[Display peer connection states](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/states) | ||
|
||
[ICE candidate gathering from STUN/TURN servers](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/trickle-ice) | ||
|
||
[Web Audio output as input to peer connection](https://googlechrome.github.io/webrtc/samples/web/content/peerconnection/webaudio-input) | ||
|
||
### RTCDataChannel ### | ||
|
||
[Data channels](https://googlechrome.github.io/webrtc/samples/web/content/datachannel) | ||
|
||
### Video chat ### | ||
|
||
[AppRTC video chat client](https://apprtc.appspot.com) powered by Google App Engine | ||
|
||
[AppRTC URL parameters](https://apprtc.appspot.com/html/params.html) | ||
|
||
## Test pages ## | ||
|
||
[Audio and Video streams](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/audio-and-video) | ||
|
||
[Iframe apprtc](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/iframe-apprtc) | ||
|
||
[Iframe video](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/iframe-video) | ||
|
||
[Multiple audio streams](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/multiple-audio) | ||
|
||
[Multiple peerconnections](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/multiple-peerconnections) | ||
|
||
[Multiple video devices](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/multiple-video-devices) | ||
|
||
[Multiple video streams](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/multiple-video) | ||
|
||
[Peer2peer](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/peer2peer) | ||
|
||
[Peer2peer iframe](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/peer2peer-iframe) | ||
|
||
[Single audio stream](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/single-audio) | ||
|
||
[Single video stream](https://googlechrome.github.io/webrtc/samples/web/content/manual-test/single-video) | ||
``` | ||
grunt shell:runPythonTests | ||
``` | ||
|
||
|
Oops, something went wrong.