summaryrefslogtreecommitdiff
path: root/webrtc/README
blob: efd7c7f564b20c4236af74e9dfc6598f227e6d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Information on developing a WebRTC transport; see
https://trac.torproject.org/projects/tor/ticket/5578.


== How to build the WebRTC Native Code Package

http://www.webrtc.org/webrtc-native-code-package
https://code.google.com/p/webrtc/

=== Installing prerequisites

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

$ sudo apt-get install g++ python libnss3-dev libasound2-dev libpulse-dev libjpeg62-turbo-dev libxv-dev libgtk2.0-dev libexpat1-dev openjdk-7-jdk libxss-dev libudev-dev libpci-dev

https://sites.google.com/a/chromium.org/dev/developers/how-tos/depottools
https://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=$PWD/depot_tools:$PATH

=== Building the package

$ mkdir webrtc
$ cd webrtc
$ gclient config --name src http://webrtc.googlecode.com/svn/trunk
$ gclient sync --force # Takes a long time! Over an hour.
$ cd src
$ ninja -C out/Debug

=== Applying the patch to build webrtc_cmd

http://blog.printf.net/articles/2013/05/17/webrtc-without-a-signaling-server/
http://blog.printf.net/articles/2014/07/01/serverless-webrtc-continued/
https://trac.torproject.org/projects/tor/ticket/5578#comment:28
http://printf.net/webrtc-cmd.patch

$ patch -p1 < webrtc-cmd.patch
$ gclient sync
$ ninja -C out/Debug

=== Using webrtc_cmd

https://trac.torproject.org/projects/tor/ticket/5578#comment:38
https://cjb.github.io/serverless-webrtc/serverless-webrtc.html

$ cd out/Debug
$ ./webrtc_cmd
Enter command:
init
Enter command:
offer
Enter command:
print
{"sdp":...}

Now that you have an offer, paste it into another compatible endpoint,
such as https://cjb.github.io/serverless-webrtc/serverless-webrtc.html.
Get a reply string to give back to webrtc_cmd.

Enter command:
reply
Enter reply:
{"sdp":...}
Enter command:
chat
hello world