视频流引擎事件通知
场景介绍
客户端UI视频流引擎的内部事件。
前提条件
视频流引擎启动成功。
开发流程
在onVmiEngineEvent回调函数,处理不同错误码。
编码实例
public void onVmiEngineEventt (int event, int reserved0, int reserved1, int reserved2, int reserved3, String additionInfo) {
if (event == VideoEngine.VMI_ENGINE_EVENT_SOCK_DISCONN) {
// 网络断开
runOnUiThread(new Runnable() {
@Override
public void run() {
// 停止逻辑线程
stopMonitorBlocked();
if (upstreamReceiveDispatcher != null) {
upstreamReceiveDispatcher.stopBlocked();
upstreamReceiveDispatcher = null;
}
// 执行视频流重连流程的开发章节的重连流程
// 或者退出云手机
}
});
}
}
父主题: 视频流客户端开发流程