Webrtc

build & install

http://www.webrtc.org/reference/getting-started

cd /tmp
mkdir webrtc
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
./depot_tools/gclient config http://webrtc.googlecode.com/svn/trunk
./depot_tools/gclient sync --force
cd trunk
./build/install-build-deps.sh
make peerconnection_server
make peerconnection_client
./out/Debug/peerconnection_server
./out/Debug/peerconnection_client

testing

http://www.webrtc.org/running-the-demos

sample code

https://github.com/ging/webrtc_demo

javascript

If the variable hasn't been declared, you wont be able to test for undefined using a function because you will get an error.

if (foo) {}
function (bar) {}(foo)

Both will generate an error if foo has not been declared.

If you want to test if a variable has been declared you can use

typeof foo != "undefined"

if you want to test if foo has been declared and it has a value you can use

if (typeof foo != "undefined" && foo) {
    //code here
}

http://weblogs.asp.net/bleroy/archive/2005/02/15/Three-common-mistakes-in-JavaScript-_2F00_-EcmaScript.aspx

http://en.wikipedia.org/wiki/JavaScript_syntax#Undefined

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License