fix[声望升级-修复BUG]
This commit is contained in:
parent
b0c5d44d1c
commit
278801b77a
@ -184,6 +184,36 @@ public class SWManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDrPkNumClarity(int selectClarity) {
|
||||||
|
if (cfg != null && mRtcEngine != null) {
|
||||||
|
VideoEncoderConfiguration.VideoDimensions videoDimensions = new VideoEncoderConfiguration.VideoDimensions();
|
||||||
|
switch (selectClarity) {
|
||||||
|
case 1:
|
||||||
|
videoDimensions.width = 720;
|
||||||
|
videoDimensions.height = 1280;
|
||||||
|
cfg.dimensions = videoDimensions;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
videoDimensions.width = 360;
|
||||||
|
videoDimensions.height = 640;
|
||||||
|
cfg.dimensions = videoDimensions;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
videoDimensions.width = 360;
|
||||||
|
videoDimensions.height = 320;
|
||||||
|
cfg.dimensions = videoDimensions;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mRtcEngine.setVideoEncoderConfiguration(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置镜像模式
|
* 设置镜像模式
|
||||||
*/
|
*/
|
||||||
|
@ -123,6 +123,7 @@ import cn.rongcloud.rtc.api.RCRTCEngine;
|
|||||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||||
import cn.rongcloud.rtc.base.RCRTCRect;
|
import cn.rongcloud.rtc.base.RCRTCRect;
|
||||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||||
|
import io.agora.beautyapi.faceunity.agora.SWManager;
|
||||||
import io.rong.imlib.IRongCallback;
|
import io.rong.imlib.IRongCallback;
|
||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
@ -1656,6 +1657,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
mLiveRoomViewHolder.endDRGif();
|
mLiveRoomViewHolder.endDRGif();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SWManager.get().setDrPkNumClarity(1);
|
||||||
// if (mLiveRoomViewHolder != null) {
|
// if (mLiveRoomViewHolder != null) {
|
||||||
// mLiveRoomViewHolder.hotAddVisibility(false);
|
// mLiveRoomViewHolder.hotAddVisibility(false);
|
||||||
// }
|
// }
|
||||||
|
@ -374,18 +374,13 @@ public class LiveGiftAnimPresenter {
|
|||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP).setmLiveUid(mLiveUid).setmStream(mStream).setmWishGiftId(blindBox.getEvent().getBlindBoxId() + "").setIsContactGift(true));
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
|
||||||
.setmLiveUid(mLiveUid)
|
|
||||||
.setmStream(mStream)
|
|
||||||
.setmWishGiftId(blindBox.getEvent().getBlindBoxId() + "")
|
|
||||||
.setIsContactGift(true));
|
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
if (mIvLook.getTag()!=null&&mIvLook.getTag()instanceof LiveReceiveGiftBean){
|
if (mIvLook.getTag() != null && mIvLook.getTag() instanceof LiveReceiveGiftBean) {
|
||||||
changeLiveRoom((LiveReceiveGiftBean) mIvLook.getTag());
|
changeLiveRoom((LiveReceiveGiftBean) mIvLook.getTag());
|
||||||
}else {
|
} else {
|
||||||
changeLiveRoom();
|
changeLiveRoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,6 +431,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeLiveRoom(LiveReceiveGiftBean mTempGifGiftBean) {
|
private void changeLiveRoom(LiveReceiveGiftBean mTempGifGiftBean) {
|
||||||
if (mTempGifGiftBean != null) {
|
if (mTempGifGiftBean != null) {
|
||||||
String uid = mTempGifGiftBean.getUid();
|
String uid = mTempGifGiftBean.getUid();
|
||||||
@ -459,7 +455,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -503,7 +499,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -657,6 +653,16 @@ public class LiveGiftAnimPresenter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 釋放全局通知
|
||||||
|
*/
|
||||||
|
public void releaseServiceNotice() {
|
||||||
|
L.eSw("releaseServiceNotice 釋放全局通知");
|
||||||
|
mHandler.sendEmptyMessageDelayed(full_service_notice_new_1, 100);
|
||||||
|
full_service_notice_new.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
private void setGitTipAnimatorBuyZuoji() {
|
private void setGitTipAnimatorBuyZuoji() {
|
||||||
mDp500 = DpUtil.dp2px(500);
|
mDp500 = DpUtil.dp2px(500);
|
||||||
mGifGiftTipShowAnimatorBuyZuoji = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyZuoji, "translationX", mDp500, 0);
|
mGifGiftTipShowAnimatorBuyZuoji = ObjectAnimator.ofFloat(mGifGiftTipGroupBuyZuoji, "translationX", mDp500, 0);
|
||||||
@ -1003,8 +1009,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((bean.getGifUrl().contains("svga") || bean.getGifUrl().contains("gif")) &&
|
if ((bean.getGifUrl().contains("svga") || bean.getGifUrl().contains("gif")) && IMLoginManager.get(mContext).isGiftEffect()) {
|
||||||
IMLoginManager.get(mContext).isGiftEffect()) {
|
|
||||||
|
|
||||||
//同一直播间,玩家自己送礼物,也能看到全服通知
|
//同一直播间,玩家自己送礼物,也能看到全服通知
|
||||||
//同一直播间,其他玩家也能看到全服通知
|
//同一直播间,其他玩家也能看到全服通知
|
||||||
@ -1159,6 +1164,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
|
|
||||||
mRoomNum = event.getLiveuid();
|
mRoomNum = event.getLiveuid();
|
||||||
if (mShowAllServer) {
|
if (mShowAllServer) {
|
||||||
|
L.eSw("mGifAll != null");
|
||||||
if (mGifAll != null) {
|
if (mGifAll != null) {
|
||||||
LiveReceiveGiftBean bean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean bean = new LiveReceiveGiftBean();
|
||||||
bean.setSendtype(91);
|
bean.setSendtype(91);
|
||||||
@ -1167,6 +1173,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifAll.offer(bean);
|
mGifAll.offer(bean);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
L.eSw("mGifAll != nullnullnullnullnullnull");
|
||||||
notifyFFGGGDJANEvent = event;
|
notifyFFGGGDJANEvent = event;
|
||||||
mShowAllServer = true;
|
mShowAllServer = true;
|
||||||
index4Guard = getFirstIndexOfValue(heightOffsetArr, 0);
|
index4Guard = getFirstIndexOfValue(heightOffsetArr, 0);
|
||||||
@ -1264,23 +1271,17 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipGroupBuyGuardNew.setVisibility(View.VISIBLE);
|
mGifGiftTipGroupBuyGuardNew.setVisibility(View.VISIBLE);
|
||||||
switch (event.getGuardType()) {
|
switch (event.getGuardType()) {
|
||||||
case "1":
|
case "1":
|
||||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ? R.mipmap.background_all_server_notify_star_zh : R.mipmap.background_all_server_notify_star_en);
|
||||||
R.mipmap.background_all_server_notify_star_zh :
|
|
||||||
R.mipmap.background_all_server_notify_star_en);
|
|
||||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#072A93"));
|
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#072A93"));
|
||||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_star_guard_onlookers);
|
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_star_guard_onlookers);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ? R.mipmap.background_all_server_notify_king_zh : R.mipmap.background_all_server_notify_king_en);
|
||||||
R.mipmap.background_all_server_notify_king_zh :
|
|
||||||
R.mipmap.background_all_server_notify_king_en);
|
|
||||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#BF0B0A"));
|
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#BF0B0A"));
|
||||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_king_guard_onlookers);
|
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_king_guard_onlookers);
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ?
|
guardAllServerNotifyBg.setBackgroundResource(WordUtil.isNewZh() ? R.mipmap.background_all_server_notify_god_zh : R.mipmap.background_all_server_notify_sgod_en);
|
||||||
R.mipmap.background_all_server_notify_god_zh :
|
|
||||||
R.mipmap.background_all_server_notify_sgod_en);
|
|
||||||
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#41057E"));
|
mGifGiftTipBuyGuardNew.setTextColor(Color.parseColor("#41057E"));
|
||||||
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_god_guard_onlookers);
|
mIvLookBuyGuardNew.setBackgroundResource(R.mipmap.btn_god_guard_onlookers);
|
||||||
break;
|
break;
|
||||||
@ -1333,13 +1334,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getLink())) {
|
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getLink())) {
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
htmlUrl.append(notifyFFGGGDJANEvent.getLink())
|
htmlUrl.append(notifyFFGGGDJANEvent.getLink()).append(notifyFFGGGDJANEvent.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||||
.append(notifyFFGGGDJANEvent.getLink().contains("?") ? "&uid=" : "?uid=")
|
|
||||||
.append(userInfo.getId())
|
|
||||||
.append("&token=")
|
|
||||||
.append(userInfo.getToken())
|
|
||||||
.append("&isZh=")
|
|
||||||
.append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
|
||||||
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getH5Type())) {
|
if (!TextUtils.isEmpty(notifyFFGGGDJANEvent.getH5Type())) {
|
||||||
if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "1")) {
|
if (TextUtils.equals(notifyFFGGGDJANEvent.getH5Type(), "1")) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
@ -1412,9 +1407,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipGroupBuyZuoji.setLayoutParams(params);
|
mGifGiftTipGroupBuyZuoji.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>" + mContext.getString(R.string.live_send_buy_zuoji_1) + "</myfont> " + (mTempGifGiftBean.getCarName());
|
||||||
+ mContext.getString(R.string.live_send_buy_zuoji_1)
|
|
||||||
+ "</myfont> " + (mTempGifGiftBean.getCarName());
|
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyZuoji.setText(spanned);
|
mGifGiftTipBuyZuoji.setText(spanned);
|
||||||
mGifGiftTipBuyZuoji.setSelected(false);
|
mGifGiftTipBuyZuoji.setSelected(false);
|
||||||
@ -1453,9 +1446,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
mGifGiftTipGroupBuyLiangName.setLayoutParams(params);
|
mGifGiftTipGroupBuyLiangName.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>"
|
String text = mTempGifGiftBean.getUserNiceName() + " <myfont size='24px'>" + mContext.getString(R.string.live_send_buy_liang_name_1) + "</myfont> " + mTempGifGiftBean.getLiangName();
|
||||||
+ mContext.getString(R.string.live_send_buy_liang_name_1)
|
|
||||||
+ "</myfont> " + mTempGifGiftBean.getLiangName();
|
|
||||||
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
Spanned spanned = Html.fromHtml(text, null, new HtmlTagHandler("myfont"));
|
||||||
mGifGiftTipBuyLiangName.setText(spanned);
|
mGifGiftTipBuyLiangName.setText(spanned);
|
||||||
mGifGiftTipBuyLiangName.setSelected(false);
|
mGifGiftTipBuyLiangName.setSelected(false);
|
||||||
|
@ -474,6 +474,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
livePushSwViewHolder.setAnDrPkRtc(String.valueOf(drPkbeans.get(i).getId()), -1);
|
livePushSwViewHolder.setAnDrPkRtc(String.valueOf(drPkbeans.get(i).getId()), -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SWManager.get().setDrPkNumClarity(drPkbeans.size());
|
||||||
if(drPkbeans.size()==1){
|
if(drPkbeans.size()==1){
|
||||||
mLiveAnchorViewHolder.closeEndPkBt();
|
mLiveAnchorViewHolder.closeEndPkBt();
|
||||||
}
|
}
|
||||||
@ -518,6 +519,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
dRjoinOtherRoom(u);
|
dRjoinOtherRoom(u);
|
||||||
//展示结束连麦按钮
|
//展示结束连麦按钮
|
||||||
mLiveAnchorViewHolder.showEndPkBt();
|
mLiveAnchorViewHolder.showEndPkBt();
|
||||||
|
mLiveAnchorViewHolder.setDrpkRoomId(CommonAppConfig.getInstance().getUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1172,6 +1174,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
if (removeIndex != -1) {
|
if (removeIndex != -1) {
|
||||||
drPkbeans.remove(removeIndex);
|
drPkbeans.remove(removeIndex);
|
||||||
}
|
}
|
||||||
|
SWManager.get().setDrPkNumClarity(drPkbeans.size());
|
||||||
setDrPkUserInfoView(drPkbeans);
|
setDrPkUserInfoView(drPkbeans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,6 @@ public class SocketSwClient {
|
|||||||
L.eSw("action3 == 2:" + u.getId());
|
L.eSw("action3 == 2:" + u.getId());
|
||||||
L.eSw("收到对方同意多人PK邀请");
|
L.eSw("收到对方同意多人PK邀请");
|
||||||
mListener.onLinkDRMicPkApplyOk(u);
|
mListener.onLinkDRMicPkApplyOk(u);
|
||||||
SWManager.get().setDimensions(3);//退出直播间,将分别率设置为 VD_840x480
|
|
||||||
} else if (action3 == 6) {//开始Pk
|
} else if (action3 == 6) {//开始Pk
|
||||||
if (LiveRoomViewHolder.mHandler != null) {
|
if (LiveRoomViewHolder.mHandler != null) {
|
||||||
LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
|
LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
|
||||||
|
@ -298,6 +298,11 @@ public class LivePlayKsyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endLiveMic() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ViewGroup getSmallContainer() {
|
public ViewGroup getSmallContainer() {
|
||||||
|
@ -610,6 +610,11 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endLiveMic() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ViewGroup getSmallContainer() {
|
public ViewGroup getSmallContainer() {
|
||||||
return mSmallContainer;
|
return mSmallContainer;
|
||||||
|
@ -415,13 +415,15 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
private void endLiveMic() {
|
public void endLiveMic() {
|
||||||
L.eSw("endLiveMic");
|
L.eSw("endLiveMic");
|
||||||
|
if(swAuManager!=null){
|
||||||
swAuManager.setMicAn(false);
|
swAuManager.setMicAn(false);
|
||||||
userJoinLinkMic = false;
|
userJoinLinkMic = false;
|
||||||
MicStatusManager.getInstance().clear();
|
MicStatusManager.getInstance().clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hideCover() {
|
public void hideCover() {
|
||||||
@ -882,17 +884,22 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
|
|
||||||
boolean isShow = false;
|
boolean isShow = false;
|
||||||
|
|
||||||
|
boolean isShowInvitation = false;
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onUpdata(String str) {
|
public void onUpdata(String str) {
|
||||||
|
|
||||||
if ("UsertoRY".equals(str)) {
|
if ("UsertoRY".equals(str)) {
|
||||||
//todo 新增dis监听
|
//todo 新增dis监听
|
||||||
if (isShow) {
|
if (isShow||MicStatusManager.getInstance().getMicStatus()==MicStatusManager.MIC_TYPE_OPEN) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isShow = true;
|
isShow = true;
|
||||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback2() {
|
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.mic_tag), new DialogUitl.SimpleCallback2() {
|
||||||
@Override
|
@Override
|
||||||
public void onCancelClick() {
|
public void onCancelClick() {
|
||||||
|
MicStatusManager.getInstance().setMicData(MicStatusManager.MIC_TYPE_DEFAULT, LiveActivity.mLiveUid);
|
||||||
|
userJoinLinkMic = false;
|
||||||
isShow = false;
|
isShow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,6 +911,10 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else if ("inviteMic".equals(str)) {
|
} else if ("inviteMic".equals(str)) {
|
||||||
|
if (isShowInvitation||MicStatusManager.getInstance().getMicStatus()==MicStatusManager.MIC_TYPE_OPEN) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
isShowInvitation = true;
|
||||||
String content = "邀請您進行語音連麥";
|
String content = "邀請您進行語音連麥";
|
||||||
String confirm = "接受";
|
String confirm = "接受";
|
||||||
String cancel = "拒絕";
|
String cancel = "拒絕";
|
||||||
@ -912,9 +923,9 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
confirm = "accept";
|
confirm = "accept";
|
||||||
cancel = "cancel";
|
cancel = "cancel";
|
||||||
}
|
}
|
||||||
DialogUitl.Builder builder = new DialogUitl.Builder(mContext).setContent(content).setTitle(mLiveBean.getUserNiceName()).setConfirmString(confirm).setCancelString(cancel).setView(R.layout.dialog_live_mic_invite).setClickCallback(new DialogUitl.SimpleCallback() {
|
DialogUitl.Builder builder = new DialogUitl.Builder(mContext).setContent(content).setTitle(mLiveBean.getUserNiceName()).setConfirmString(confirm).setCancelString(cancel).setView(R.layout.dialog_live_mic_invite).setClickCallback3(new DialogUitl.SimpleCallback3() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog) {
|
||||||
String[] permissions;
|
String[] permissions;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
permissions = new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.RECORD_AUDIO};
|
permissions = new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.RECORD_AUDIO};
|
||||||
@ -924,13 +935,17 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
LiveAudienceActivity.mProcessResultUtil.requestPermissions(permissions, new Runnable() {
|
LiveAudienceActivity.mProcessResultUtil.requestPermissions(permissions, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// UsertoRY();
|
|
||||||
//将自己设置成给主播,和主播连麦
|
|
||||||
L.eSw("将自己设置成给主播,和主播连麦");
|
L.eSw("将自己设置成给主播,和主播连麦");
|
||||||
joinLiveMic();
|
joinLiveMic();
|
||||||
|
isShowInvitation = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel() {
|
||||||
|
isShowInvitation = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
builder.build().show();
|
builder.build().show();
|
||||||
|
|
||||||
@ -948,6 +963,11 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void endLiveMicUser(){
|
||||||
|
endLiveMic();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onOpenDrawer(LiveAudienceEvent event) {
|
public void onOpenDrawer(LiveAudienceEvent event) {
|
||||||
if (event.getType() == LiveAudienceEvent.LiveAudienceType.LIVE_VIDEO) {
|
if (event.getType() == LiveAudienceEvent.LiveAudienceType.LIVE_VIDEO) {
|
||||||
|
@ -114,6 +114,11 @@ public class LivePlayTxViewHolder extends LiveRoomPlayViewHolder implements ITXL
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endLiveMic() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.view_live_play_tx;
|
return R.layout.view_live_play_tx;
|
||||||
|
@ -130,6 +130,8 @@ public abstract class LiveRoomPlayViewHolder extends AbsViewHolder implements IL
|
|||||||
|
|
||||||
public abstract void claerDrPkInfoView();
|
public abstract void claerDrPkInfoView();
|
||||||
|
|
||||||
|
public abstract void endLiveMic();
|
||||||
|
|
||||||
|
|
||||||
public interface OnMicCallback {
|
public interface OnMicCallback {
|
||||||
void onMikUpdate();
|
void onMikUpdate();
|
||||||
|
@ -4058,6 +4058,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,showB);
|
mLiveGiftAnimPresenter.showAllServerNotifyFFGGGD(notifyFFGGGDJANEvent,showB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cancelAllAnim(){
|
||||||
|
if(mLiveGiftAnimPresenter!=null){
|
||||||
|
mLiveGiftAnimPresenter.releaseServiceNotice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//全服通知 购买坐骑
|
//全服通知 购买坐骑
|
||||||
public void showBuyZuojiMessage(LiveReceiveGiftBean bean) {
|
public void showBuyZuojiMessage(LiveReceiveGiftBean bean) {
|
||||||
if (mLiveGiftAnimPresenter == null) {
|
if (mLiveGiftAnimPresenter == null) {
|
||||||
|
@ -957,6 +957,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
if (mLiveAudienceViewHolder != null) {
|
if (mLiveAudienceViewHolder != null) {
|
||||||
mLiveAudienceViewHolder.removeCallbacks();
|
mLiveAudienceViewHolder.removeCallbacks();
|
||||||
}
|
}
|
||||||
|
if(mLivePlayViewHolder!=null){
|
||||||
|
mLivePlayViewHolder.stopPlay2();
|
||||||
|
mLiveRoomViewHolder.cancelAllAnim();
|
||||||
|
}
|
||||||
//断开socket
|
//断开socket
|
||||||
if (mSocketRyClient != null) {
|
if (mSocketRyClient != null) {
|
||||||
mSocketRyClient.disConnect();
|
mSocketRyClient.disConnect();
|
||||||
@ -988,9 +992,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mLiveSwLinkMicPkPresenter.release();
|
mLiveSwLinkMicPkPresenter.release();
|
||||||
mLiveSwLinkMicPkPresenter = null;
|
mLiveSwLinkMicPkPresenter = null;
|
||||||
}
|
}
|
||||||
if(mLivePlayViewHolder!=null){
|
|
||||||
mLivePlayViewHolder.stopPlay2();
|
|
||||||
}
|
|
||||||
if (mLiveEndViewHolder != null) {
|
if (mLiveEndViewHolder != null) {
|
||||||
removeLiveEnd();
|
removeLiveEnd();
|
||||||
}
|
}
|
||||||
@ -1168,6 +1170,26 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
DialogUitl.showSimpleDialog(mContext, null, "連麥中,退出將斷開語音連麥!", false, new DialogUitl.SimpleCallback3() {
|
DialogUitl.showSimpleDialog(mContext, null, "連麥中,退出將斷開語音連麥!", false, new DialogUitl.SimpleCallback3() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog) {
|
public void onConfirmClick(Dialog dialog) {
|
||||||
|
if(isSw){
|
||||||
|
if(mLivePlayViewHolder!=null){
|
||||||
|
mLivePlayViewHolder.endLiveMic();
|
||||||
|
HttpClient.getInstance().get("live.leaveDrLm", "live.leaveDrLm")
|
||||||
|
.params("roomid", liveID)
|
||||||
|
.execute(new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
Log.e("ry", code + "退出多人");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (isBackPressed) {
|
||||||
|
MicStatusManager.getInstance().clear();
|
||||||
|
((LiveAudienceActivity) mContext).closeRoom();
|
||||||
|
} else {
|
||||||
|
EventBus.getDefault().post(new LiveRoomChangeEvent(bean, liveType, liveTypeVal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
if (RCRTCEngine.getInstance().getRoom() == null || RCRTCEngine.getInstance().getRoom().getLocalUser() == null) {
|
if (RCRTCEngine.getInstance().getRoom() == null || RCRTCEngine.getInstance().getRoom().getLocalUser() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1231,6 +1253,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancel() {
|
public void onCancel() {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="65dp"
|
android:layout_width="65dp"
|
||||||
android:layout_height="65dp"
|
android:layout_height="65dp"
|
||||||
@ -46,11 +45,11 @@
|
|||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:autoPlay="true" />
|
app:autoPlay="true" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -65,8 +64,11 @@
|
|||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:text="用户名称"
|
android:text="用户名称"
|
||||||
android:textColor="#F6F7FB"
|
android:textColor="#F6F7FB"
|
||||||
|
tools:textColor="@color/gray1"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -100,7 +102,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="120dp"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
@ -130,7 +132,7 @@
|
|||||||
android:id="@+id/mic_btn"
|
android:id="@+id/mic_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="28dp"
|
android:layout_height="28dp"
|
||||||
android:layout_marginEnd="36dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:background="@drawable/bg_anchor_mic_info_btn_ok"
|
android:background="@drawable/bg_anchor_mic_info_btn_ok"
|
||||||
android:text="同意"
|
android:text="同意"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
|
Loading…
Reference in New Issue
Block a user