fix bug of NPL in MoGoLiveManager

This commit is contained in:
zhongchao
2021-02-07 16:29:08 +08:00
parent 0b5f07c319
commit 1ffd5e7302

View File

@@ -367,10 +367,13 @@ public class MoGoLiveManager {
* 退出房间
*/
private void logOutRoom() {
if (mExpressEngine == null) {
return;
}
if (!TextUtils.isEmpty(currentRoomId)) {
mExpressEngine.logoutRoom(currentRoomId);
}
if(customVideoCaptureConfig == null){
if (customVideoCaptureConfig == null) {
// 创建自定义视频采集对象
customVideoCaptureConfig = new ZegoCustomVideoCaptureConfig();
// 设置自定义视频采集视频帧数据类型
@@ -459,7 +462,10 @@ public class MoGoLiveManager {
* 停止预览
*/
private void stopPreview() {
ZegoExpressEngine.getEngine().stopPreview();
if(mExpressEngine == null){
return;
}
mExpressEngine.stopPreview();
}
/**
@@ -474,8 +480,11 @@ public class MoGoLiveManager {
* 停止推送数据
*/
private void stopPublishingStream() {
if(mExpressEngine == null){
return;
}
// 停止推送
ZegoExpressEngine.getEngine().stopPublishingStream();
mExpressEngine.stopPublishingStream();
}
/**