add[声望升级-修复BUG]
This commit is contained in:
@@ -885,7 +885,7 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show("主播正在PK,稍後再試");
|
||||
ToastUtil.show(getString(R.string.pking_over));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import io.agora.beautyapi.faceunity.agora.SWAuManager;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@@ -791,6 +792,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
* 退出直播间
|
||||
*/
|
||||
private void close() {
|
||||
SWAuManager.get().exitChannelAll();
|
||||
handler.removeCallbacks(runnable);
|
||||
handler1.removeCallbacks(runnable1);
|
||||
((LiveAudienceActivity) mContext).onBackPressed();
|
||||
|
||||
@@ -226,7 +226,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
* @param Uid
|
||||
*/
|
||||
public void setPkView(String Uid) {
|
||||
L.eSw("setPkView Uid "+Uid);
|
||||
L.eSw("setPkView Uid " + Uid);
|
||||
mPkContainer.setVisibility(View.VISIBLE);
|
||||
swAuManager.updateMyChannelView((FrameLayout) mLeftContainer, Integer.parseInt(liveUid));
|
||||
ry_view.removeAllViews();
|
||||
@@ -242,13 +242,13 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
@Override
|
||||
public void setDrMicInfo(UserBean u) {
|
||||
isAdd = true;
|
||||
L.eSw("setDrMicInfo:-----------------" + u.getId()+" drMicUserList"+new Gson().toJson(drMicUserList));
|
||||
L.eSw("setDrMicInfo:-----------------" + u.getId() + " drMicUserList" + new Gson().toJson(drMicUserList));
|
||||
for (int i = 0; i < drMicUserList.size(); i++) {
|
||||
if (u.getId().equals(drMicUserList.get(i).getId())||u.getId().equals(liveUid)) {
|
||||
if (u.getId().equals(drMicUserList.get(i).getId()) || u.getId().equals(liveUid)) {
|
||||
isAdd = false;
|
||||
}
|
||||
}
|
||||
L.eSw("setDrMicInfo:---------------isAdd--"+isAdd );
|
||||
L.eSw("setDrMicInfo:---------------isAdd--" + isAdd);
|
||||
//加载多人PK(连麦)主播视图
|
||||
if (isAdd) {
|
||||
dr_pk_view.setVisibility(View.VISIBLE);
|
||||
@@ -281,7 +281,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (info.length > 0) {
|
||||
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||
List<DrPkbean> drPkbeans = JSONObject.parseArray(obj.getString("userlist"), DrPkbean.class);
|
||||
List<DrPkbean> drPkbeans = JSONObject.parseArray(obj.getString("userlist"), DrPkbean.class);
|
||||
int removeIndex = -1;
|
||||
for (int i = 0; i < drPkbeans.size(); i++) {
|
||||
if (liveUid.equals(String.valueOf(drPkbeans.get(i).getId()))) {
|
||||
@@ -312,7 +312,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
}
|
||||
}
|
||||
|
||||
public void setDrPkView(List<DrPkbean> drPkbeanList){
|
||||
public void setDrPkView(List<DrPkbean> drPkbeanList) {
|
||||
if (detailsView1 != null) {
|
||||
dr1_preview.removeView(detailsView1);
|
||||
}
|
||||
@@ -405,14 +405,13 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 退出单人pk
|
||||
*
|
||||
* @param pkUid
|
||||
*/
|
||||
public void endpk(String pkUid) {
|
||||
L.eSw("endpk "+pkUid);
|
||||
L.eSw("endpk " + pkUid);
|
||||
mPkContainer.setVisibility(View.GONE);
|
||||
swAuManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), SWAuManager.getChannelName(pkUid));
|
||||
swAuManager.updateMyChannelView(ry_view, Integer.parseInt(liveUid));
|
||||
@@ -438,7 +437,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
for (int i = 0; i < drMicUserList.size(); i++) {
|
||||
swAuManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), drMicUserList.get(i).getId());
|
||||
}
|
||||
drMicUserList =new ArrayList<>();
|
||||
drMicUserList = new ArrayList<>();
|
||||
//將當前主播畫面放大
|
||||
swAuManager.updateMyChannelView((FrameLayout) ry_view, Integer.parseInt(liveUid));
|
||||
}
|
||||
@@ -666,7 +665,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
mStarted = false;
|
||||
Bus.getOff(this);
|
||||
EventBus.getDefault().unregister(this);
|
||||
swAuManager.exitChannelAll();
|
||||
//swAuManager.exitChannelAll();
|
||||
L.e(TAG, "release------->");
|
||||
}
|
||||
|
||||
@@ -919,15 +918,26 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
mVideoView.requestLayout();
|
||||
}
|
||||
|
||||
boolean isShow = false;
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("UsertoRY".equals(str)) {
|
||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback() {
|
||||
//todo 新增dis监听
|
||||
if (isShow) {
|
||||
return;
|
||||
}
|
||||
isShow = true;
|
||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
isShow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
UsertoRY();
|
||||
dialog = null;
|
||||
isShow = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1425,6 +1435,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
url = url.replace(".flv", videoRatioHorizontal[PLAY_MODEL_480] + videoFps[0] + ".flv");
|
||||
}
|
||||
}
|
||||
|
||||
private class ExoPlayerListener implements Player.Listener {
|
||||
String TAG = "播放流";
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.weight.LiveFloatView;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
@@ -122,6 +121,8 @@ import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCSwitchRoleCallback;
|
||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||
import io.agora.beautyapi.faceunity.agora.LiveFloatView;
|
||||
import io.agora.beautyapi.faceunity.agora.SWAuManager;
|
||||
import io.rong.imlib.IRongCallback;
|
||||
import io.rong.imlib.IRongCoreCallback;
|
||||
import io.rong.imlib.IRongCoreEnum;
|
||||
@@ -326,7 +327,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void run() {
|
||||
loading.setVisibility(View.GONE);
|
||||
enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
|
||||
ToastUtil.show(mContext.getString(R.string.net_error) + " :500");//异常下播,等待加载时间过了后弹出
|
||||
//ToastUtil.show(mContext.getString(R.string.net_error) + " :500");//异常下播,等待加载时间过了后弹出
|
||||
}
|
||||
};
|
||||
|
||||
@@ -940,7 +941,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.removeFromParent();
|
||||
mLiveRoomViewHolder.countDownTimerTrickery = null;
|
||||
}
|
||||
|
||||
mLiveAudienceViewHolder = null;
|
||||
mLivePlayViewHolder = null;
|
||||
mLiveRoomViewHolder = null;
|
||||
@@ -1940,6 +1940,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
if (!isEnterRoom) {
|
||||
return;
|
||||
}
|
||||
SWAuManager.get().exitChannelAll();
|
||||
LiveNetManager.get(mContext)
|
||||
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user