WebRTC on a standalone mobile app

后端 未结 16 2184
一个人的身影
一个人的身影 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 09:56

    For iOS, just add this to your CocoaPods Podfile

    pod "libjingle_peerconnection"
    
    
    # Add this to the bottom so it won't have issues with active architecture
    post_install do |installer_representation|
        installer_representation.project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
                config.build_settings['VALID_ARCHS'] = ['armv7', 'i386']
            end
        end
    end
    

    Check this for which revisions are available. Revision 6802.X reflects to this from the actual WebRTC code base.

    Android will be added to maven central very soon, I'll make an edit to this when happens.

    If you want to manually build WebRTC check out github.com/pristineio/webrtc-build-scripts which also includes a step by step guide for both platforms

    0 讨论(0)
  • 2021-01-30 09:58

    As of March 2014, here is a way to do that, indeed:

    That would be if you're interested in having a native client. If you don't mind using a mobile browser, the following ones are currently supported:

    • Google Chrome 28 (Enabled by default since 29)
    • Mozilla Firefox 24
    • Opera Mobile 12

    Source:

    0 讨论(0)
  • 2021-01-30 09:58

    My team has done quite a bit of work in this area. If you are looking for a Cordova plugin we've been playing with an open source project called PhoneRTC. We have it running on iOS but it's a bit unreliable and the aspect ratio of the video window is fixed in a way that looks unnatural on most devices but it does work.

    We've also created an Android demo using libjingle. Libjingle is now part of the WebRTC project and code base. This link is probably out of date now but points to instructions that worked for us at the time.

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

    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.

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

    As of today, WebRTC officially is available natively on Android/iOS.

    https://webrtc.github.io/webrtc-org/native-code/android/

    https://webrtc.github.io/webrtc-org/native-code/ios/

    Although under the hood, it is just a Java/Objective C wrapper around the C++ APIs.

    You can still use them without going through JavaScript.

    The Java wrapper API : https://code.google.com/p/webrtc/source/browse/trunk/talk/#talk%2Fapp%2Fwebrtc%2Fjava%2Fsrc%2Forg%2Fwebrtc

    The Objective C wrapper API : https://code.google.com/p/webrtc/source/browse/trunk/talk/#talk%2Fapp%2Fwebrtc%2Fobjc%2Fpublic%253Fstate%253Dclosed

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

    Quite late to answer.. But i just made a framework for adding WebRTC easily in iOS Project. You won't need to build WebRTC framework from the library. This framework will give you built in framework along with a wrapper for easy addition of webRTC to your app. https://github.com/Ankit-Aggarwal/SwiftyWebRTC

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