WebRTC,名称源自网页实时通信(英语:Web Real-Time Communication)的缩写,是一个支持网页浏览器进行实时语音对话或视频对话的API。它于2011年6月1日开源并在Google、Mozilla、Opera支持下被纳入万维网联盟的W3C推荐标准

iOS中WebRTC参考资料

Mac下编译WebRTC

准备好梯子, 按照官方教程编译, 参考这里

1
2
3
4
5
mkdir webrtc_ios && cd webrtc_ios

export GYP_DEFINES="OS=ios"

fetch webrtc_ios

慢着,这里的fetch命令貌似没有啊,原来是没有安装depot_tools

1
2
3
4
5
cd <some_where_for_depot_tools>

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

export PATH=`pwd`/depot_tools:"$PATH"

重新做第一步fetch,

下载了竟6G的东东竟然失败了:

Error: Command ‘/usr/bin/python -u src/sync_chromium.py –target-revision f8d6ba9efdddfb3aa0dfc01cd579f500a2de0b8d’ returned non-zero exit status 2 in /Users/chenza/src/webrtc_ios Traceback (most recent call last): File “/Users/chenza/src/depot_tools/fetch.py”, line 342, in sys.exit(main()) File “/Users/chenza/src/depot_tools/fetch.py”, line 337, in main return run(options, spec, root) File “/Users/chenza/src/depot_tools/fetch.py”, line 331, in run return checkout.init() File “/Users/chenza/src/depot_tools/fetch.py”, line 142, in init self.run_gclient(*sync_cmd) File “/Users/chenza/src/depot_tools/fetch.py”, line 76, in run_gclient return self.run(cmd_prefix + cmd, **kwargs) File “/Users/chenza/src/depot_tools/fetch.py”, line 66, in run return subprocess.check_output(cmd, **kwargs) File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”, line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command ‘(‘gclient’, ‘sync’, ‘–with_branch_heads’)’ returned non-zero exit status 2

重试几次无果,

1
gclient sync

会失败,原因是访问google storage失败。

{% ruby 该死|天朝 %}的网络呀。

挂梯子,全程翻,还是失败。只好使用人家已经编译好的版本。见apprt-ios, apprt-ios提供了pod,可以直接使用。