Skip to content

Simplified version of AppRTC (without Audio or Video, but with messages through Data Channels) that uses web sockets as the signaling mechanism. It has a very tiny server made with Node.js.

Notifications You must be signed in to change notification settings

awesomeleo/webRTCAndroidClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

webRTCAndroidClient

This is a simplified version of AppRTC (without Audio or Video, but with messages through Data Channels) that in turn uses web sockets as the signaling mechanism. It has a very tiny server made with Node.js.

As said previously, this is a variation of AppRTC, the sample application from the maintainers of WebRTC. This app has been modified to just send messages peer to peer using Web RTC data channels, without using https://apprtc.appspot.com and Google App Engine channels as signaling mechanism.

In turn, this application uses a small HTTP server made with Node.js + socket.io that provides a mean for clients to interchange Web RTC metadata in order to establish the P2P connection.

Prerequisites:

  • Make sure gclient is checking out tools necessary to target Android: your .gclient file should contain a line like: target_os = ['android', 'unix'] Make sure to re-run gclient sync after adding this to download the tools.
  • Env vars need to be set up to target Android; easiest way to do this is to run (from the libjingle trunk directory): . ./build/android/envsetup.sh Note that this clobbers any previously-set $GYP_DEFINES so it must be done before the next item.
  • Set up webrtc-related GYP variables: export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 $GYP_DEFINES" export JAVA_HOME=</path/to/JDK> export PATH=$JAVA_HOME/bin:$PATH To cause WEBRTC_LOGGING to emit to Android's logcat, add enable_tracing=1 to the $GYP_DEFINES above.
  • When targeting both desktop & android, make sure to use a different output_dir value in $GYP_GENERATOR_FLAGS or you'll likely end up with mismatched ARM & x86 output artifacts. If you use an output_dir other than out/ make sure to modify the command-lines below appropriately.
  • Finallym, run "gclient runhooks" to generate Android-targeting .ninja files.

Example of building & using the app:

cd <path/to/libjingle>/trunk ninja -C out/Debug AppRTCDemo adb install -r out/Debug/AppRTCDemo-debug.apk

About

Simplified version of AppRTC (without Audio or Video, but with messages through Data Channels) that uses web sockets as the signaling mechanism. It has a very tiny server made with Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published