WebRTC on a standalone mobile app

2020-05-12 04:55发布

I know that WebRTC was designed for browsers, but is it possible to use WebRTC libraries on mobile applications directly?

Thanks!

标签: webrtc
16条回答
Anthone
2楼-- · 2020-05-12 05:22

SightCall has a WebRTC-compatible SDK for Android that lets Android-native apps connect to WebRTC in a browser. You can get the SDK here

查看更多
男人必须洒脱
3楼-- · 2020-05-12 05:22

For now you have two options:

  • Either you will build libWebRTC for your device. You need to know how to work with Android NDK and native C code on iOS. It is non trivial but it's perfectly doable
  • Use work of others who did this for you. E.g. already mentioned AddLive (yip, I work there) or even OpenTok.
查看更多
一纸荒年 Trace。
4楼-- · 2020-05-12 05:22

If you are targeting android >= L you can build a native webRTC app pretty easily by embedding a (chrome) webview - which supports WebRTC - into your app.

See chrome webview

查看更多
够拽才男人
5楼-- · 2020-05-12 05:24

It is possible to work with WebRTC in mobile applications with the use of 3rd-party API's like OpenTok (iOS only, as of January 2014 Android in beta) http://tokbox.com/opentok/webrtc/downloads/index.html and Addlive (iOS and Android) http://www.addlive.com/platform-overview/

查看更多
ゆ 、 Hurt°
6楼-- · 2020-05-12 05:27

You could use WebRTC with native apps, but it requires a bit of work. WebRTC Native app anatomy

If you look at the image you can see a red rectangle at the bottom. That's the native C++ libraries of WebRTC. The WebRTC classes and WebRTC objects for audio and Video can also be found as part of the WebRTC project.What you would need to add is an API for your app to be able to setup calls(The VOIP interface), a signaling stack and NAT traversal utilities(Core Protocol- For SIP this could be something like PJSIP and PJNATH) and an adapter from your signaling stack to webrtc, telling it when to open channels for video and audio and when to stop them etc.

See also: http://bloggeek.me/porting-webrtc-mobile/

查看更多
够拽才男人
7楼-- · 2020-05-12 05:27

I don't know what do you mean by "use WebRTC libraries on mobile applications directly". But there is something that I'm already done. Build WebRTC NS/AEC/AECM/AGC/VAD modules with JNI + NDK, and use the shared library on android. or you can build whole WebRTC VoE and ViE for both android and iOS.

查看更多
登录 后发表回答