您的位置:首页 > 移动开发 > Android开发

WebRTC for android ios开发官方指南

2017-07-06 15:40 169 查看
The WebRTC native code package can be found at:https://chromium.googlesource.com/external/webrtc
https://webrtc.org/faq/Prerequisite Install depot_tools manage checkouts and code reviews. The depot_tools package includes gclient, gcl, git-cl, repo, and others.Confirm git and python are installed. git 2.2.1+ recommended. python 2.7+ recommended.
Fetch depot_tools:
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.gitAdd depot_tools to your PATH:
$ export PATH=`pwd`/depot_tools:"$PATH"Yes, you want to put depot_tools ahead of everything else, otherwise gcl will refer to the GNU Common Lisp compiler.
Example Applicationssrc/webrtc/examples and src/talk/examples:1,Peerconnection :consist of two applications using the WebRTC Native APIs:peerconnection_server and peerconnection_client (not currently supported on Mac/Android)2,Call AppTarget name call (currently disabled).establishes a call using libjingle.Call uses xmpp (as opposed to SDP used by WebRTC) to allow you to login using your gmail account and make audio/video calls with your gmail friends.3,relayserverCan be used with the call application above.4,stunserver5,turnserver安装好javaAndroidfetch --nohooks webrtc_android 约16 GB, gclient sync 编译:进入src目录gn gen out/Debug --args='target_os="android" target_cpu="arm"'ninja -C out/DebugAppRTCMobile is an Android application using WebRTC Native APIs via JNI (JNI wrapper is documented here).For instructions on how to build and run, see webrtc/examples/androidapp/README.可以生成android studio工程:详见官网iOSA macOS machine is required for iOS development.fetch --nohooks webrtc_ios gclient syncgn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'ninja -C out/ios_64 target To see a list of available targets, run gn ls out/<output folder>.可以生成xcode工程It’s easiest to deploy to a device using Xcode. Other command line tools exist as well, e.g. ios-deploy.Using WebRTC in your appninja -C out/ios rtc_sdk_framework_objc本人已经在美国服务器上将android和ios的代码全部下载并同步了。然后打包放在了百度云上,大家只需要继续gn gen和ninja就可以了,android和ios我都只运行到gclient sync!android打包后有12G,因为里面含有android sdk和ndk.ios大约有6G.首次同步时间是2017.07.05,大家可以根据指南更新:https://webrtc.org/native-code/development/ 的updating the code章节!对应的docker镜像如下:

参考:https://webrtc.org/native-codehttps://webrtc.org/faq/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: