0

I'm experimenting with WebRTC from Android, so far using libjingle from this repo had made me successfully creates a native android app that broadcast a WebRTC video to my webapp rendered in browser (check my project here), or the other way around (check my project here)

But now I want to make some changes or maybe extend some functions to enable me to render MediaStream into android default VideoView. So I look for this library's source code in their repo but I couldn't find it (the source jars are all empty).

Does anybody knows where to acquire it?

Thanks

Bromo Programmer
  • 670
  • 2
  • 13
  • 37

1 Answers1

4

It looks you are using years old libjingle repo. Follow the official WebRTC build instructions for Android to build latest code base.
You need a Ubuntu OS to build the WebRTC jar/aar for android.

Generating gradle to build the demo app in AndroidStudio:

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

Generating WebRTC Framework to link in any other native App:

./tools_webrtc/android/build_aar.py

This command will generate libwebrtc.aar, it will contain all the dependent(.jar/.so) files. Just import this .aar into your existing App.

You may need to change your app code, to make compatible with latest WebRTC API's.
See Demo & API source.

Then you can play with VideoRender & SurfaceViewRenderer

Ajay
  • 2,483
  • 2
  • 16
  • 27
  • Hi, Ajay thanks for your answer :)... I tried your suggestion to build from the link you gave. My question is: how many giga storage required to built? because I'm using VM with a size of 20GB and still not enough. – Bromo Programmer Jun 13 '17 at 09:06
  • This will take around 20GB after build process, better create a VM with 50GB. See https://bugs.chromium.org/p/webrtc/issues/detail?id=5006. You can try my latest built framework @https://github.com/AjayChoudary/WebRTCFramework/tree/master/Android – Ajay Jun 13 '17 at 10:16
  • wow thanks a lot ;) – Bromo Programmer Jun 13 '17 at 11:39
  • @Ajay, Can you please jump into this issue: [Unable to Compile WebRTC Library for Android](https://stackoverflow.com/q/61318223/10413749) – Muhammad Usman Bashir Apr 20 '20 at 08:37