cr-web-rtc
Version:
宸瑞 Web RTC 包
60 lines (43 loc) • 1.11 kB
Markdown
### 宸瑞WEB端RTC接口Javascript代码包
// todo 简要功能说明
// todo 有待完成 简要描述
#### 概要
本 package 基于 Kurento-utils js 的扩展,服务于 宸瑞软件 相关实时视频通信项目(Web前端),使相关功能的编程更高效更便捷的实现。
#### 安装
外网 npm 服务器
```
npm install cr-web-rtc --save
npm i cr-web-rtc
```
公司网
```
npm set registry http://dev.qy.cr-health.com:4873
npm i @cr/crrtc
//or
npm i @cr/crrtc --registry=http://dev.qy.cr-health.com:4873
```
#### 使用
```
import { CRRTCinital, CRRTCClient } from "@cr/crrtc"
// 初始化BaseUrl和网关参数
CRRTCinital($(`BaseURL`), "/one2one", "");
// 'wss://' + location.host + '/one2one'
/**
* eg. send()
*
var message = {
id : 'call', // 命令
from : 'name', // 发送人
to : 'peer', // 接收人
sdpOffer : offerSdp //
};
var jsonMessage = JSON.stringify(message);
send(jsonMessage)
*/
CRRTCClient.send(jsonMessage)
});
```
// ... 编辑中 ...
#### 参考文档
https://doc-kurento.readthedocs.io
####