WebRTC on a standalone mobile app

后端 未结 16 2214
一个人的身影
一个人的身影 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

提交回复
热议问题