Coder Social home page Coder Social logo

mehome / webrtc-android-demo-apprtc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duqian291902259/webrtc-android-apprtc

0.0 2.0 0.0 29.14 MB

WebRTC is a free, open project.The source code of this demo is based on official samples(src/samples/androidapp). I have compiled webrtc source to get required .so and .jar files, so you can just build it by android studio.

Java 100.00%

webrtc-android-demo-apprtc's Introduction

webrtc-android-demo-apprtc

WebRTC is a free, open project.The source code of this demo is based on official samples(src/samples/androidapp). I have compiled webrtc source to get required .so and .jar files, so you can just build it by android studio.

demo

How to start

This demo is based on WebRTC.the official website: https://webrtc.org/

How to build and run?

Please clone this project,build it with android stuido,install the target apk files to your devices.

Overview

1,go to website : https://appr.tc/.input your room id(any number).

webrtc-server

2,open the apprtc app,input the same room id.

webrtc-android-app

3,Experience p2p connectivity with webrtc.

webrtc p2p connectivity

Development

if you try to compile the source of webrtc,you'll depressed at its large size,the total checkout size will be about 16 GB. and more than 30G after compiled. for more details about getting source code: https://webrtc.org/native-code/android/

if you have installed all required softwares in linux. let's excute cmds like the follow tips:

#!/bin/bash
#[email protected]

export PATH=$PATH:~/webrtc/depot_tools

cd ~/webrtc/android/

fetch --nohooks webrtc_android
gclient sync
gclient runhooks

ls
cd src

git new-branch webrtc_compile
git checkout webrtc_compile

echo "--------------compile config:android,arm-----------------"

gn gen out/arm --args='target_os="android" target_cpu="arm"'

echo "-----------------start compiling webrtc---------------------"

ninja -C out/arm

echo "-----------------compile webrtc done---------------------"

#ninja -C out/arm AppRTCMobile
#build/android/gradle/generate_gradle.py --output-directory $PWD/out/arm --target "//webrtc/examples:AppRTCMobile" --use-gradle-process-resources --split-projects --canary

echo "start copying jar files"
mkdir ../libs/armeabi-v7a/

cp out/arm/lib.java/sdk/android/libjingle_peerconnection_java.jar ../libs/libjingle_peerconnection_java.jar 
cp out/arm/lib.java/rtc_base/base_java.jar ../libs/base_java.jar 
cp out/arm/gen/modules/audio_device/audio_device_java__compile_java.javac.jar ../libs/audio_device_java__compile_java.javac.jar
cp out/arm/lib.java/examples/androidapp/third_party/autobanh/autobanh.jar ../libs/autobanh.jar

echo "start copying so files"

cp out/arm/libjingle_peerconnection_so.so ../libs/armeabi-v7a/libjingle_peerconnection_so.so

echo "task has finished"
exit 0

# scp /Users/duqian/Downloads/webrtc_arm.sh [email protected]:/home/nonolive/webrtc/android/

Future

Maybe I will share more articles about webrtc in the future.

Thanks to WebRTC team!

Dusan's E-mail: [email protected]

WebRTC Demos:webrtc-android-demo-apprtc

webrtc-android-demo-apprtc's People

Contributors

duqian291902259 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.