天天看点

openwebrtc(1) 服务端和android客户端demo安装

openwebrtc 是基于 gstreamer 实现的开源的、跨平台的 webrtc 客户端框架,支持 h.264 和 vp8。利用 openwebrtc,webrtc就不再仅仅是纯粹浏览器技术了,你可以在nativeapp中使用webrtc,并且还可以与浏览器webrtc互联互通。

openwebrtc(1) 服务端和android客户端demo安装

demo使用nodejs做服务器。centos安装:

下载example代码:

安装文档参考:

<a href="https://github.com/ericssonresearch/openwebrtc-examples/tree/master/web">https://github.com/ericssonresearch/openwebrtc-examples/tree/master/web</a>

之后就可以在web进行视频了,使用支出webrtc的浏览器。首先创建房间,然后让另一个客户端,join再call就可以了。

openwebrtc(1) 服务端和android客户端demo安装

下载最新的android studio,配置好。编译android项目。

<a href="https://github.com/ericssonresearch/openwebrtc-examples/tree/master/android/nativecall">https://github.com/ericssonresearch/openwebrtc-examples/tree/master/android/nativecall</a>

项目nativecall 是客户端sdkdemo。比较粗糙。

需要注意的是,编译会出警告。增加配置:abortonerror : false

其中buildtoolsversion 根据自己的版本修改。

修改config配置,进入app再修改也行。假设服务安装在192.168.1.60。

android客户端,可以和web端进行视频,但是好像木有声音,需要再研究下。

使用openwebrtc可以很简单的搭建web视频聊天。但是需要优化的地方还很多。继续研究。