---
title: 视频流引擎事件通知
description: "客户端UI视频流引擎的内部事件。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/armnative/kunpengcpsvideo_16_0026.html
sourcePath: /source/zh/kunpengboostkithistory/2300/armnative/kunpengcpsvideo_16_0026.html
indexId: d4435839d2f4223f004ff5a9347ba0b48e77c60a7b114dc606b08d2dd43d5b4377
---
# 视频流引擎事件通知

#### 场景介绍

客户端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;
}
// 执行视频流重连流程的开发章节的重连流程
// 或者退出云手机
}
});
}
}
```
