fix bug of logout room

This commit is contained in:
zhongchao
2021-02-07 15:32:52 +08:00
parent 960f61435d
commit 0b5f07c319
2 changed files with 8 additions and 1 deletions

View File

@@ -4,3 +4,4 @@
-keep class com.mogo.cloud.live.model.*{*;}
-keep class com.mogo.cloud.live.network.LiveApiServer{*;}
-keep class com.zhidao.ptech.shadow.server.protocol.DeviceInfo{*;}
-keep class **.zego.**{*;}

View File

@@ -370,6 +370,12 @@ public class MoGoLiveManager {
if (!TextUtils.isEmpty(currentRoomId)) {
mExpressEngine.logoutRoom(currentRoomId);
}
if(customVideoCaptureConfig == null){
// 创建自定义视频采集对象
customVideoCaptureConfig = new ZegoCustomVideoCaptureConfig();
// 设置自定义视频采集视频帧数据类型
customVideoCaptureConfig.bufferType = ZegoVideoBufferType.RAW_DATA;
}
mExpressEngine.enableCustomVideoCapture(false, customVideoCaptureConfig, ZegoPublishChannel.MAIN);
mExpressEngine.setEventHandler(null);
}
@@ -403,7 +409,7 @@ public class MoGoLiveManager {
* 停止直播
*/
public void stopLive() {
if (!TextUtils.isEmpty(currentRoomId)) {
if (!TextUtils.isEmpty(currentStreamId)) {
mExpressEngine.stopPlayingStream(currentStreamId);
}
stopPreview();