|
|
|
## 互动组件对接文档
|
|
|
|
|
|
|
|
|
|
|
|
## 1. 简介
|
|
|
|
|
|
|
|
为增强直播业务互动性,自云直播SDK v4.1.0版本开始,逐步提供互动组件库
|
|
|
|
|
|
|
|
### 组件版本
|
|
|
|
|
|
|
|
| 组件 | 最新版本 | 支持云直播SDK版本(>=) |
|
|
|
|
| ---------- | -------- | ----------------------- |
|
|
|
|
| 组件基础库 | 1.0.1 | 4.1.0 |
|
|
|
|
| 点赞 | 1.0.0 | 4.1.0 |
|
|
|
|
| 打赏 | 1.0.0 | 4.1.0 |
|
|
|
|
| 投票 | 1.0.1 | 4.2.0 |
|
|
|
|
| 红包雨 | 1.0.2 | 4.2.0 |
|
|
|
|
| 邀请卡 | 1.0.2 | 4.3.0 |
|
|
|
|
| 问卷 | 1.1.2 | 4.3.0 |
|
|
|
|
| 直播带货 | 1.1.0 | 4.6.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 2. 结构图
|
|
|
|
![结构图](framwork.png)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.基础库引入
|
|
|
|
注意:所有使用互动组件必须要引入basemodule库
|
|
|
|
|
|
|
|
项目根目录gradle引入
|
|
|
|
|
|
|
|
```groovy
|
|
|
|
repositories {
|
|
|
|
maven { url 'http://nexus-app.bokecc.com/repository/sdk-group/' }
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
项目的model.gradle引入
|
|
|
|
|
|
|
|
```java
|
|
|
|
dependencies {
|
|
|
|
api ('com.bokecc:basemodule:x.x.x')
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Application添加代码
|
|
|
|
|
|
|
|
```java
|
|
|
|
InteractSDK.getInstance().init(app);
|
|
|
|
```
|
|
|
|
## 4.组件库
|
|
|
|
|
|
|
|
[一、点赞](互动组件/点赞)
|
|
|
|
|
|
|
|
[二、打赏](互动组件/打赏)
|
|
|
|
|
|
|
|
[三、投票](互动组件/投票)
|
|
|
|
|
|
|
|
[四、红包雨](互动组件/红包雨)
|
|
|
|
|
|
|
|
[五、邀请卡](互动组件/邀请卡)
|
|
|
|
|
|
|
|
[六、问卷](互动组件/问卷)
|
|
|
|
|
|
|
|
[七、直播带货](互动组件/直播带货)
|
|
|
|
|