WebRTC on a standalone mobile app

后端 未结 16 2183
一个人的身影
一个人的身影 2021-01-30 09:42

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

Thanks!

相关标签:
16条回答
  • 2021-01-30 10:06

    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/

    0 讨论(0)
  • 2021-01-30 10:06

    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.
    0 讨论(0)
  • 2021-01-30 10:10

    Let me summarize the answer, on Android Firefox actually has WebRTC support I believe, on the other hand there is a bunch of companies out there providing the full stack for building an WebRTC Product. If you are after just WebRTC and building the other stuff (addressing etc) your self you probably have to Build a couple of wrappers yourself. (Disclaimer I work for sinch)

    [http://sinch.com]
    [http://twilio.com]
    [http://tokbox.com]
    [http://nexmo.com]
    [http://plivo.com] (I think)
    

    There is some more out there, but these are the main ones

    We all have our different benefits and weaknesses. if you are interested send an email and I can talk about sinch.

    0 讨论(0)
  • 2021-01-30 10:10

    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

    0 讨论(0)
提交回复
热议问题