Merge remote-tracking branch 'origin/live_sdk' into live_sdk

# Conflicts:
#	foudations/mogo-live/src/main/java/com/mogo/cloud/live/manager/MoGoLiveManager.java
This commit is contained in:
董宏宇
2021-02-07 17:48:24 +08:00
4 changed files with 5 additions and 5 deletions

1
.idea/gradle.xml generated
View File

@@ -26,6 +26,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -48,6 +48,7 @@ dependencies {
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:tanlu:${MOGO_TANLU_VERSION}"
implementation "com.mogo.cloud:realtime:${MOGO_REALTIME_VERSION}"
implementation "com.mogo.cloud:realtime:${MOGO_TRAFFICLIVE_VERSION}"
} else {
implementation project(":modules:mogo-tanlu")
implementation project(":modules:mogo-realtime")

View File

@@ -166,7 +166,7 @@ public class MoGoLiveManager {
/**
* 事件回调用
*/
private IZegoEventHandler mEventHandler = new IZegoEventHandler() {
private final IZegoEventHandler mEventHandler = new IZegoEventHandler() {
// 调试错误信息回调
@Override
@@ -397,7 +397,7 @@ public class MoGoLiveManager {
* 停止直播
*/
public void stopLive() {
if (!TextUtils.isEmpty(currentStreamId)) {
if (!TextUtils.isEmpty(currentStreamId) && mExpressEngine != null) {
mExpressEngine.stopPlayingStream(currentStreamId);
}
stopPreview();
@@ -476,7 +476,6 @@ public class MoGoLiveManager {
* 停止观看直播
*/
public void onDestroyLive() {
logOutRoom();
destroyEngine();
}
}

View File

@@ -87,15 +87,14 @@ public class TrafficLiveManager implements ILiveProgressListener {
requestLiveManager.requestVehicleHeadLive(LIVE_TYPE_CLOSE, liveSn, new IRequestLiveListener() {
@Override
public void onSuccess() {
MoGoLiveManager.getInstance().stopLive();
}
@Override
public void onError(Throwable e) {
MoGoLiveManager.getInstance().stopLive();
callBack.onError(e.getMessage());
}
});
MoGoLiveManager.getInstance().stopLive();
surfaceView = null;
callBack = null;
isLoginSuccess = false;