关播时间问题
This commit is contained in:
parent
3b1c5ac1ec
commit
ed2879e263
@ -27,8 +27,6 @@ import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||
import com.lzf.easyfloat.utils.LifecycleUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
@ -139,6 +137,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
//观众与主播连麦逻辑
|
||||
private LiveLinkMicPresenter mLiveLinkMicPresenter;
|
||||
private LiveBean mLiveBean;
|
||||
|
||||
//sdk类型 0金山 1腾讯
|
||||
private int mLiveSDK;
|
||||
//主播与主播连麦逻辑
|
||||
@ -186,6 +185,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
private View loading;
|
||||
|
||||
private int landscape;
|
||||
private String leaveStream = "", leaveGroupId = "";
|
||||
|
||||
public PortraitLiveManager setQuitF(boolean quitF) {
|
||||
isQuitF = quitF;
|
||||
@ -343,12 +343,17 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
.enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback<EnterRoomNewModel>() {
|
||||
@Override
|
||||
public void onSuccess(EnterRoomNewModel data) {
|
||||
|
||||
isEnterRoom = true;
|
||||
if (TextUtils.isEmpty(leaveStream)) {
|
||||
leaveStream = mLiveBean.getStream();
|
||||
leaveGroupId = mLiveBean.getUid();
|
||||
}
|
||||
landscape = data.getLiveInfo().getLandscape();
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(landscape);
|
||||
//是否热度卡加成
|
||||
liveHandler.postDelayed(() -> mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard()), 700);
|
||||
|
||||
isEnterRoom = true;
|
||||
//延时1秒发送
|
||||
liveHandler.postDelayed(sendFIm, 700);
|
||||
|
||||
@ -1231,7 +1236,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}, 4000);//3秒后执行Runnable中的run方法
|
||||
|
||||
}
|
||||
if (mLivePlayViewHolder!=null){
|
||||
if (mLivePlayViewHolder != null) {
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(1);
|
||||
}
|
||||
}
|
||||
@ -1501,13 +1506,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
if (mLiveBean != null) {
|
||||
isEnterRoom = false;
|
||||
|
||||
RongChatRoomClient.getInstance().quitChatRoom("g" + mLiveBean.getUid(), new IRongCoreCallback.OperationCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
try {
|
||||
Log.i("tx", "退出成功" + mLiveBean.getUid());
|
||||
LiveNetManager.get(mContext)
|
||||
.leaveRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
@ -1515,9 +1521,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
leaveStream = "";
|
||||
leaveGroupId = "";
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -1528,20 +1535,20 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
@Override
|
||||
public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
|
||||
try {
|
||||
|
||||
Log.i("tx", "退出成功" + mLiveBean.getUid());
|
||||
LiveNetManager.get(mContext)
|
||||
.leaveRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
leaveStream = "";
|
||||
leaveGroupId = "";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user