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

简介: 本文的原文连接是: http://blog.csdn.net/freewebsys/article/details/46649667 转载请一定注明出处!1,关于openwebrtcOpenWebRTC 是基于 Gstreamer 实现的开源的、跨平台的 WebRTC 客户端框架,支持 H.264 和 VP8。利用 OpenWebRTC,WebRTC就不再仅仅是纯

本文的原文连接是: http://blog.csdn.net/freewebsys/article/details/46649667 转载请一定注明出处!

1,关于openwebrtc

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

这里写图片描述

2,安装服务端demo

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

yum install nodejs nodejs-devel

下载example代码:

cd /data
git clone https://github.com/EricssonResearch/openwebrtc-examples.git
cd openwebrtc-examples/web
#启动
nohup node channel_server.js &
#默认端口8080

安装文档参考:
https://github.com/EricssonResearch/openwebrtc-examples/tree/master/web

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

3,android客户端demo

下载最新的android studio,配置好。编译android项目。
https://github.com/EricssonResearch/openwebrtc-examples/tree/master/android/NativeCall
项目NativeCall 是客户端sdkdemo。比较粗糙。
需要注意的是,编译会出警告。增加配置:abortOnError : false

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "21.1.2"
    defaultConfig {
        applicationId "com.ericsson.research.owr.examples.nativecall"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"

        ndk {
            abiFilter "armeabi-v7a"
        }
    }
//    compileOptions {
//        sourceCompatibility JavaVersion.VERSION_1_7
//        targetCompatibility JavaVersion.VERSION_1_7
//    }
    productFlavors {
    }
    android {
        lintOptions {
            abortOnError false
        }
    }
}

dependencies {
//    See settings.gradle for local dev instructions
//    compile project(':openwebrtc-sdk')
    compile 'io.openwebrtc:openwebrtc-android-sdk:0.1.0'
}

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

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

package com.ericsson.research.owr.examples.nativecall;

public class Config {
    /*
        Changing this does not take effect until app user data is cleared or the app is uninstalled.
        The server address can be configured inside the application by pressing the icon in the top right.
     */
    //public static final String DEFAULT_SERVER_ADDRESS = "http://demo.openwebrtc.io:38080";
    public static final String DEFAULT_SERVER_ADDRESS = "http://192.168.1.60:8080";


    public static final String STUN_SERVER = "mmt-stun.verkstad.net";
}

4,总结

本文的原文连接是: http://blog.csdn.net/freewebsys/article/details/46649667 转载请一定注明出处!

android客户端,可以和web端进行视频,但是好像木有声音,需要再研究下。
使用openwebrtc可以很简单的搭建web视频聊天。但是需要优化的地方还很多。继续研究。

目录
相关文章
|
4月前
|
编解码 Linux Android开发
安卓投屏神器 Scrcpy 安装与使用(支持 Mac、Windows、Linux)
安卓投屏神器 Scrcpy 安装与使用(支持 Mac、Windows、Linux)
237 0
|
4月前
|
开发工具 Android开发 开发者
Android Studio详细下载,安装使用教程
Android Studio详细下载,安装使用教程
301 0
|
4月前
|
Linux 测试技术 Android开发
Linux下Android Studio 3.6以及最新版安装图文详解
Linux下Android Studio 3.6以及最新版安装图文详解
226 0
|
5月前
|
Linux Android开发 iOS开发
基于.Net开发的ChatGPT客户端,兼容Windows、IOS、安卓、MacOS、Linux
基于.Net开发的ChatGPT客户端,兼容Windows、IOS、安卓、MacOS、Linux
88 0
|
5月前
|
Web App开发 Oracle Java
如何优雅地安装 Android Studio
如何优雅地安装 Android Studio
106 0
|
4月前
|
XML 搜索推荐 Java
Android Studio开发之借助FileProvider在应用之间共享文件讲解及实战(包括发送彩信,安装应用等 附源码超详细)
Android Studio开发之借助FileProvider在应用之间共享文件讲解及实战(包括发送彩信,安装应用等 附源码超详细)
56 0
|
6月前
|
API Android开发 计算机视觉
视觉智能平台有android人脸识别拍照demo?
视觉智能平台有android人脸识别拍照demo么?
65 0
|
6月前
|
存储 传感器 定位技术
《移动互联网技术》 第四章 移动应用开发: Android Studio开发环境的使用方法:建立工程,编写源程序,编译链接,安装模拟器,通过模拟器运行和调试程序
《移动互联网技术》 第四章 移动应用开发: Android Studio开发环境的使用方法:建立工程,编写源程序,编译链接,安装模拟器,通过模拟器运行和调试程序
67 0
|
6月前
|
Java Android开发 开发者
1024程序节|Android框架之一 BRVAH【BaseRecyclerViewAdapterHelper】使用demo
BRVAH是一个强大的RecyclerAdapter框架(什么是RecyclerView?),它能节约开发者大量的开发时间,集成了大部分列表常用需求解决方案。为什么会有它?请查看「Android开源框架BRVAH由来篇」该框架于2016年4月10号发布的第1个版本到现在已经一年多了,经历了800多次代码提交,140多次版本打包,修复了1000多个问题,获得了9000多star,非常感谢大家的使用以及反馈。
140 0
|
3月前
|
网络协议 安全 网络安全
Android Termux安装SSH结合内网穿透实现远程SFTP文件传输
Android Termux安装SSH结合内网穿透实现远程SFTP文件传输
47 0