README.md 12.7 KB
Newer Older
雍佳明's avatar
雍佳明 committed
1
# 百家云点播回放core sdk 集成文档
雍佳明's avatar
雍佳明 committed
2
请参考 http://dev.baijiayun.com/wiki/detail/65
雍佳明's avatar
雍佳明 committed
3

雍佳明's avatar
雍佳明 committed
4 5 6 7 8 9
## 常规版本 VS 稳定版本的说明
- 常规版本 SDK:三周左右迭代一次,需求迭代较快,云端课堂上线观察无重大崩溃后发版。
- 稳定版本 SDK:从近三个月常规发版遴选,无重大 bug。以 **-stable** 标记。

偏向新功能推荐集成常规版本,偏向稳定推荐集成稳定版本。

雍佳明's avatar
雍佳明 committed
10 11 12 13 14
## 分支说明
**master 分支为 4.0 SDK 迭代的主分支。新增 master_3.x 分支,为 3.x SDK 对应的分支,原则上不再迭代新功能,仅考虑合入重大修复。**

## changeLog

pengwenjian's avatar
pengwenjian committed
15
**3.14.0**之后changelog:https://git2.baijiashilian.com/open-android/VideoPlayer2.0Demo/-/releases
pengwenjian's avatar
pengwenjian committed
16

雍佳明's avatar
雍佳明 committed
17
## CHANGELOG
pengwenjian's avatar
pengwenjian committed
18 19 20 21

# 3.13.0 [2022-7-18]
- 【修复】移除QbSdk.disableSensitiveApi

pengwenjian's avatar
pengwenjian committed
22
# 3.10.0 [2022-6-14]
pengwenjian's avatar
pengwenjian committed
23
- 【升级】ijk4.0.0
雍佳明's avatar
雍佳明 committed
24

pengwenjian's avatar
pengwenjian committed
25 26
# 3.8.3 [2022-5-17]

pengwenjian's avatar
pengwenjian committed
27 28 29 30 31
# 3.8.0 [2022-4-18]

- 【新增】专业1v1小班课回放信令录制
- 【删除】删除百家云播放器

pengwenjian's avatar
pengwenjian committed
32 33 34 35
# 3.7.0 [2022-3-24]

- 【修复】其它已知问题修复

雍佳明's avatar
雍佳明 committed
36 37 38 39
# 3.6.0 [2022-1-10]

- 【新增】回放 PPT 目录支持显示缩略图

陈鹏伟's avatar
陈鹏伟 committed
40 41 42 43 44
# 3.5.0 [2021-12-22]

- 【修复】暂停且拖动进度条后进度条不更新
- 【修复】其它已知问题修复

pengwenjian's avatar
pengwenjian committed
45 46 47 48
3.2.0 [2021-11-05]  
==============
- 【新增】点播支持离线播放ev2视频

pengwenjian's avatar
pengwenjian committed
49 50 51 52
3.2.0 [2021-10-15]  
==============
- 【新增】点播支持ev2视频格式

pengwenjian's avatar
pengwenjian committed
53 54 55 56
3.0.0 [2021-08-30]  
==============
- 统一版本号

雍佳明's avatar
雍佳明 committed
57 58 59 60 61 62
3.0.0-beta03 [2021-08-17]  
==============
> 大版本发布API有变更,建议时间充裕下谨慎升级。(初次依赖可忽视) 

- 【新增】回放支持跑马灯

雍佳明's avatar
雍佳明 committed
63 64
3.0.0-beta01 [2021-07-15]  
==============
雍佳明's avatar
雍佳明 committed
65
> 大版本发布API有变更,建议时间充裕下谨慎升级。(初次依赖可忽视) 
雍佳明's avatar
雍佳明 committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79

- 【新增】ChatVM.getObservableOfMessageReceived()返回当前时刻的聊天消息
- 【修复】动态课件中视频未自动播放
- 【修复】聊天消息重复返回
- 【优化】移除2.0 sdk 标记废弃的API

**部分修改api:**

`BJYPlayerSDK.newPlayBackRoom()  ->  BJYPlayerSDK.newPlaybackRoom()`

`PBRoom 移除 newPPTVM、getObservableOfUserNumberChange()`

`PBRoom.isPlayBackOffline() -> PBRoom.isPlaybackOffline()`

雍佳明's avatar
雍佳明 committed
80 81 82
2.6.11 [2021-06-28]
==============
- 【新增】回放新增公告
雍佳明's avatar
雍佳明 committed
83
- 【修复】ijk -10000报错切bjyplayer崩溃
雍佳明's avatar
雍佳明 committed
84
- 【修复】android 10以上暗黑模式下,某些动效课件显示异常
雍佳明's avatar
雍佳明 committed
85
- 【修复】ijk 偶现跳到开头开始播放
雍佳明's avatar
雍佳明 committed
86

雍佳明's avatar
雍佳明 committed
87 88 89 90 91
2.6.5 [2021-04-19]
==============
- 【优化】文字画笔支持自动换行
- 【修复】已知问题修复

雍佳明's avatar
雍佳明 committed
92 93 94 95 96 97 98

2.5.2 [2021-03-26]
==============
- 【优化】跑马灯优化
- 【优化】信令查找逻辑优化
- 【修复】回放离线emoji使用的网络图片

雍佳明's avatar
雍佳明 committed
99 100 101 102 103
2.5.1 [2021-03-01]
==============
- 【修复】回放兼容点播token进房间请求课件大纲接口崩溃
- 【新增】回放支持显示后台配置的跑马灯(低于直接调用api设置的跑马灯)

雍佳明's avatar
雍佳明 committed
104 105 106 107 108 109 110 111 112 113 114
2.5.0 [2021-01-27]
==============
- 【修复】去掉动效PPT没有收到page_change_end禁止翻页的逻辑
- 【修复】兼容下载目录没有以文件分隔符结尾,获取下载路径有问题
- 【修复】解决答题器、小测 seek返回多个信令
- 【优化】移除webview禁用cache的逻辑
- 【优化】5.0及以下版本读shape_add解决大量画笔导致的内存占用过高
- 【新增】回放支持课件大纲
- 【升级】升级androidX


雍佳明's avatar
雍佳明 committed
115 116
2.4.2 [2020-12-10]
==============
雍佳明's avatar
雍佳明 committed
117
- [修复]修复2.4.1引入的回放屏幕共享监听未初始化导致的空指针
雍佳明's avatar
雍佳明 committed
118

雍佳明's avatar
雍佳明 committed
119
~~2.4.1~~
雍佳明's avatar
雍佳明 committed
120 121 122 123
==============
- 【修复】2.4.0引入向后seek聊天消息重复
- 【修复】屏幕共享被音频占位图覆盖
- 【优化】离线有网状态下优先加载动效PPT
雍佳明's avatar
雍佳明 committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
- 【新增】新增动效PPT加载开始回调
```
pptView.setPPTErrorListener(new PPTView.OnPPTErrorListener() {
            @Override
            public void onAnimPPTLoadError(int errorCode, String description) {
               
            }

            @Override
            public void onAnimPPTLoadFinish() {
               
            }

            @Override
            public void onAnimPPTLoadStart() {

            }
        });
```
雍佳明's avatar
雍佳明 committed
143

雍佳明's avatar
雍佳明 committed
144 145
2.4.0
==============
雍佳明's avatar
雍佳明 committed
146 147
- 【修复】ppt偶现空指针
- 【修复】升级SDK后已下载回放进房间报错
雍佳明's avatar
雍佳明 committed
148
- 【新增】配置项&&BJYPlayerSDK.enablePlaybackUserSignal=true才处理user信令
雍佳明's avatar
雍佳明 committed
149
- 【优化】向后seek增量返回信令
雍佳明's avatar
雍佳明 committed
150 151 152
- 【优化】回放user达到200人后不再返回user_in、user_out信令
- 【新增】兼容拆分的user.json

雍佳明's avatar
雍佳明 committed
153 154 155 156
2.3.9
==============
- 修复混淆之后和其它SDK冲突,报duplicate class

雍佳明's avatar
雍佳明 committed
157 158 159 160 161 162 163 164 165 166 167 168
2.3.8
==============
- 修复屏幕分享主摄像头关闭状态导致显示音频占位图盖住屏幕分享画面
- 去掉play()报“视频未初始化”的报错
- 增加自定义广播监听
```
compositeDisposable.add(pbRoom.getObservableOfCustomBroadcast()
                .subscribe(lpJsonModel -> {
                    BJLog.d("test", lpJsonModel.data.toString());
                }));
```

雍佳明's avatar
雍佳明 committed
169 170 171 172 173
2.3.7
==============
- 兼容已下载裁剪回放,强制使用all.json。避免视频和PPT不同步。


雍佳明's avatar
雍佳明 committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
2.3.6
==============
- user相关信令默认不处理
- 修复2.3.3引入长期课进房间报错的崩溃
- 修复信令下载过程中退出房间导致的 No such file or directory

```
如果要使用user相关信令请在初始化时打开开关
BJYPlayerSDK.java
 /**
         * 开启回放user相关信令
         * @return
         */
        public Builder enablePlaybackUserSignal()
```

~~2.3.4~~
雍佳明's avatar
雍佳明 committed
191 192 193
==============
- 兼容旧版离线裁剪信令未裁剪的情况

雍佳明's avatar
雍佳明 committed
194
~~2.3.3~~
雍佳明's avatar
雍佳明 committed
195 196 197 198 199
==============
- 动态PPT加载超时回调
- 修复聊天不支持多表情混排显示
- 动态PPT升级到v3版本

雍佳明's avatar
雍佳明 committed
200 201 202 203
2.3.2
==============
- 修复报-10000切播放器后上报失效

雍佳明's avatar
雍佳明 committed
204 205 206 207
2.3.1
==============
- 修复部分回放离线不显示课件和聊天

雍佳明's avatar
雍佳明 committed
208 209 210 211 212 213
2.3.0
==============
- shape_del只去除自己前面的画笔,解决画笔显示不全
- doc_all_res中处理多白板
- 修复seek过程中shape_update被移除导致画笔丢失

雍佳明's avatar
雍佳明 committed
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
2.2.11
==============
- 回放支持裁剪
```
在线 BJYPlayerSDK.java
   /**
     * 创建录播回放房间 -- 在线回放[长期房间,分段]
     *
     * @param context
     * @param classId   教室 ID
     * @param sessionId 分段id
     * @param version   裁剪版本
     * @param token     token
     * @return
     */
    public static PBRoom newPlayBackRoom(Context context, long classId, long sessionId, int version, String token) {
        return new PBRoomImpl(context, classId, sessionId, version, token);
    }
下载 DownloadManange.java
 /**
     * 创建回放下载任务
     * @param fileName     文件名称
     * @param roomId       房间id
     * @param sessionId    长期房间id,如果不是长期房间传0的值即可
     * @param token        房间token
     * @param extraInfo    额外信息,客户自己存储的字符串信息,sdk只是转存
     * @param version      裁剪版本
     * @return
     */
    public Observable<DownloadTask> newPlaybackDownloadTask(final String fileName, final long roomId, final long sessionId, final String token,
                                                            final String extraInfo, int version) {
        return newPlaybackDownloadTask(fileName, roomId, sessionId, token, extraInfo, BJYPlayerSDK.IS_ENCRYPT, preferredDefinitionList, version);
    }
```

2.2.9
==============
- 优先读command.json + chat.json,加快进房间速度
- fix 上报npe

雍佳明's avatar
雍佳明 committed
254
2.2.6
雍佳明's avatar
雍佳明 committed
255 256 257 258
==============
- 修复离线首次运行不能正常显示表情
- 修复没有chat.json不显示聊天

雍佳明's avatar
雍佳明 committed
259 260 261 262 263 264 265
2.2.3
==============
- 去掉往外抛"信令文件还未打开"的报错
- 回放信令处理,减少一次getCurrentDoc()调用
- webview 5.x(Androidx 1.1.0)bugfix
- 优化错误提示

雍佳明's avatar
雍佳明 committed
266
2.2.2
雍佳明's avatar
雍佳明 committed
267 268 269 270
==============
- 日志上报可配置
- onTrimMemory时清理glide缓存

雍佳明's avatar
雍佳明 committed
271
VideoplayerCore 2.2.1
雍佳明's avatar
雍佳明 committed
272 273 274 275 276 277
==============
- 增加日志上报
- 修复离线未处理media_publish信令
- 修复记忆播放暂停未立马记录currTime到磁盘
- 修复enterRoom过程中调了quitRoom()导致缓存目录被删除的进房间失败

雍佳明's avatar
雍佳明 committed
278 279 280 281 282
VideoplayerCore 2.1.8
==============
- 优化回放大信令文件内存
- shape_append冗余移除逻辑优化

雍佳明's avatar
雍佳明 committed
283
VideoplayerCore 2.1.7
雍佳明's avatar
雍佳明 committed
284 285
==============
- 支持字幕
雍佳明's avatar
雍佳明 committed
286
- 修复下载onStarted() onPaused()回调两次
雍佳明's avatar
雍佳明 committed
287

雍佳明's avatar
雍佳明 committed
288 289 290 291 292
VideoplayerCore 2.1.5
==============
- 支持离线上报
- 回放支持问答
- 离线不展示答题器和小测
雍佳明's avatar
雍佳明 committed
293 294 295 296

VideoplayerCore 2.1.4
==============
- fix 偶现离线ppt初始页串页
雍佳明's avatar
雍佳明 committed
297
- fix 偶现timer already cancelled
雍佳明's avatar
雍佳明 committed
298

雍佳明's avatar
雍佳明 committed
299 300 301
VideoplayerCore 2.1.3
==============
- fix ppt为非doc类型时,回放不显示的bug
雍佳明's avatar
雍佳明 committed
302
- fix 上报空指针
雍佳明's avatar
雍佳明 committed
303

雍佳明's avatar
雍佳明 committed
304
VideoplayerCore 2.1.2
雍佳明's avatar
雍佳明 committed
305 306 307 308 309 310 311 312 313
==============
- 增加视频宽高回调

```
 BJYPlayerView bjyPlayerView.setOnVideoSizeListener((width, height) -> {
            BJLog.d("bjy", "onVideoSizeChange invoke " + width + ", " + height);
        });

```
雍佳明's avatar
雍佳明 committed
314 315 316
- 优化回放进房间处理信令的逻辑
- fix 离线PPT断网不显示
- fix onLaunchSuccess 回调seek不起作用
雍佳明's avatar
雍佳明 committed
317

雍佳明's avatar
雍佳明 committed
318

雍佳明's avatar
雍佳明 committed
319 320 321 322 323 324 325 326 327 328 329
VideoplayerCore 2.1.0
==============
- 增加腾讯x5内核
- 增加BJYMediaPlayer

```
//设置播放器类型为百家云播放器
BJYPlayerSDK.PLAYER_TYPE = PlayerType.BJYPlayer;
```


雍佳明's avatar
雍佳明 committed
330 331 332 333 334 335
VideoplayerCore 2.0.7
==============
- PPTView 支持单击、双击监听
- upgrade迁移数据支持指定存储目录
```
 pptView.setOnViewTapListener((view, x, y) -> {
雍佳明's avatar
雍佳明 committed
336
            
雍佳明's avatar
雍佳明 committed
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
        });

        pptView.setOnDoubleTapListener(new GestureDetector.OnDoubleTapListener() {
            @Override
            public boolean onSingleTapConfirmed(MotionEvent e) {
                return false;
            }

            @Override
            public boolean onDoubleTap(MotionEvent e) {
                return false;
            }

            @Override
            public boolean onDoubleTapEvent(MotionEvent e) {
                return false;
            }
        });
```
```
 /**
     * 兼容1.x SDK 下载记录,需在loadDownloadInfo()之前调用
     * @param cacheFolder                 自定义下载记录保存路径
     * @param downloadRecordStoragePath   下载记录保存路径
     * @param userIdentify                用户唯一识别id,如果自定义路径但没有区分用户则传空字符即可
     */
    public void upgrade(File cacheFolder, String downloadRecordStoragePath, String userIdentify)
```

雍佳明's avatar
雍佳明 committed
366 367 368 369 370 371
VideoplayerCore 2.0.6
==============
- 回放支持小测
- 上报版本信息


雍佳明's avatar
雍佳明 committed
372
VideoplayerCore 2.0.5.4
雍佳明's avatar
雍佳明 committed
373
==============
雍佳明's avatar
雍佳明 committed
374
必须同步更新videoplayerUI至2.0.2 
雍佳明's avatar
雍佳明 committed
375 376 377 378 379 380
- 回放支持多白板
- 回放支持在线动态PPT
- 回放支持画笔虚线
- 增加本地日志
- 增加supports_https参数
- 更新mmkv,支持自定义下载记录保存路径
雍佳明's avatar
雍佳明 committed
381
- 更新bjijkplayer至1.3.6,解决部分机型倍速播放问题
雍佳明's avatar
雍佳明 committed
382 383
- 规范回放解压目录
- 离线支持解压一次后保存缓存文件(超过阈值后按LRU算法清除),加快进房间速度
雍佳明's avatar
雍佳明 committed
384
- 离线支持记忆播放
雍佳明's avatar
雍佳明 committed
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400

设置下载记录存储路径
```
  /**
     *
     * @param userIdentify                 用户唯一标识
     * @param downloadRecordStoragePath    下载记录存储路径
     * @param reload                       是否每次强制刷新,默认传false
     */
    public void loadDownloadInfo(String userIdentify, String downloadRecordStoragePath, boolean reload)
```

回放离线播放(不每次删除解压目录)
```
/**
     * 离线播放,传未解压的视频和信令文件(不每次删除解压目录)
雍佳明's avatar
雍佳明 committed
401 402 403
     * @param context                       context上下文
     * @param videoDownloadModel            视频DownloadModel
     * @param signalDownloadModel           信令DownloadModel
雍佳明's avatar
雍佳明 committed
404
     */
雍佳明's avatar
雍佳明 committed
405
    public PBRoomImpl(Context context, DownloadModel videoDownloadModel, DownloadModel signalDownloadModel)
雍佳明's avatar
雍佳明 committed
406 407 408
```


雍佳明's avatar
雍佳明 committed
409 410 411 412
VideoplayerCore 2.0.4.7
==============
- fix 点播回放数据上报格式错误

雍佳明's avatar
雍佳明 committed
413
VideoplayerCore 2.0.4.5
雍佳明's avatar
雍佳明 committed
414 415 416 417
==============
- fix setAutoPlay()对回放不生效
- fix 视频数据上报bug

雍佳明's avatar
雍佳明 committed
418 419 420 421
VideoplayerCore 2.0.4.3
==============
- 画笔支持还原书写过程
- 解决没有新的聊天消息依然回调的bug
雍佳明's avatar
雍佳明 committed
422

雍佳明's avatar
雍佳明 committed
423
VideoplayerCore 2.0.4.2
雍佳明's avatar
雍佳明 committed
424 425 426
==============
- 升级bjijkplayer to 1.3.3,解决5.0机器倍速播放变声不变调

雍佳明's avatar
雍佳明 committed
427 428 429
VideoplayerCore 2.0.4.1
==============
- 修复偶现PPT初始页面不对的bug
雍佳明's avatar
雍佳明 committed
430 431 432 433 434 435 436 437

VideoplayerCore 2.0.4
==============
- 新增setAutoPlay(),控制是否自动播放
- 更新下载文件名非法字符正则
- fix selectedDefinition未置空导致获取视频地址为null


雍佳明's avatar
雍佳明 committed
438 439 440
VideoplayerCore 2.0.3
==============
- 离线播放路径非法返回错误信息
雍佳明's avatar
雍佳明 committed
441
- 修复回放PPT加载失败后重试的同时关闭页面导致的崩溃
雍佳明's avatar
雍佳明 committed
442 443 444
- 修复某些情况下视频播放过程中被系统强制息屏
- DownloadManager.loadDownloadInfo()由异步改为同步
- fix 播放完currentTime!=duration
雍佳明's avatar
雍佳明 committed
445

雍佳明's avatar
雍佳明 committed
446
VideoplayerCore 2.0.2-alpha
雍佳明's avatar
雍佳明 committed
447 448 449
==============
- 支持迁移1.x下载记录

雍佳明's avatar
雍佳明 committed
450
VideoplayerCore 2.0.0
雍佳明's avatar
雍佳明 committed
451
==============
雍佳明's avatar
雍佳明 committed
452
- 全新设计,更解耦