Merge branch 'master' into dev_6.7.0

This commit is contained in:
Martin
2024-06-17 10:55:47 +08:00
10 changed files with 125 additions and 35 deletions

View File

@@ -124,6 +124,7 @@ import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
import cn.rongcloud.rtc.base.RCRTCRect;
import cn.rongcloud.rtc.base.RTCErrorCode;
import io.agora.beautyapi.faceunity.agora.SWManager;
import io.agora.rtc2.RtcEngine;
import io.rong.imlib.IRongCallback;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
@@ -555,12 +556,16 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
}
});
SWManager.get().setLeaveFlag(true);
mLiveAnchorViewHolder.setLeaveFlag(true);
} else if (leave == 1) {
leave = 0;
leave_img.setVisibility(View.GONE);
// 清除水印
boolean ret = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(null, rect);
sendSystemMessageSw(mContext.getString(R.string.live_anchor_come_back));
SWManager.get().setLeaveFlag(false);
mLiveAnchorViewHolder.setLeaveFlag(false);
}
HttpClient.getInstance().get("Live.isLeave", "Live.isLeave")

View File

@@ -30,9 +30,6 @@ import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.enums.PopupPosition;
import com.makeramen.roundedimageview.RoundedImageView;
import com.stx.xhb.androidx.XBanner;
import com.stx.xhb.androidx.transformers.ScalePageTransformer;
import com.yunbao.common.custom.LiveGuardScalePageTransformer;
import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.adapter.LiveBuyGuardPrivilegeAdapter;
import com.yunbao.common.bean.CheckUpgradesModel;
@@ -42,6 +39,7 @@ import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
import com.yunbao.common.bean.GuardPriceModel;
import com.yunbao.common.bean.GuardUserInfoModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.custom.LiveGuardScalePageTransformer;
import com.yunbao.common.dialog.AbsDialogPopupWindow;
import com.yunbao.common.dialog.GuardBuyTipsDialog;
import com.yunbao.common.dialog.GuardUpgradePopup;
@@ -52,6 +50,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@@ -160,8 +159,8 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
buyGuardBannerModels.add(guardBannerModel);
}
buyGuardBanner.setBannerData(R.layout.banner_item_buy_guard, buyGuardBannerModels);
buyGuardBanner.setIsClipChildrenMode(true);
buyGuardBanner.setCustomPageTransformer(new LiveGuardScalePageTransformer());
buyGuardBanner.setIsClipChildrenMode(true);
guardPrivilegeStrings = data.getGuardData().get(0).getGuardPrivilege();
buyGuardBanner.postDelayed(new Runnable() {
@Override

View File

@@ -92,20 +92,22 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
private TextView menuRed;
private static LinearLayout btn_end_pk_dr;
private String drpkRoomId; //多人 PK 房主 roomUid
private ImageView leaveImg;
public void setDrpkRoomId(String drpkRoomId) {
this.drpkRoomId = drpkRoomId;
}
public void showEndPkBt(){
if(btn_end_pk_dr!=null){
if(btn_start_dr_pk_view.getVisibility()==View.GONE){
public void showEndPkBt() {
if (btn_end_pk_dr != null) {
if (btn_start_dr_pk_view.getVisibility() == View.GONE) {
btn_end_pk_dr.setVisibility(View.VISIBLE);
}
}
}
public void closeEndPkBt(){
if(btn_end_pk_dr!=null){
public void closeEndPkBt() {
if (btn_end_pk_dr != null) {
btn_end_pk_dr.setVisibility(View.GONE);
}
}
@@ -132,6 +134,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
mDrawable1 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_func_1);
btn_end_pk_dr = (LinearLayout) findViewById(R.id.btn_end_pk_dr);
mBtnFunction = (ImageView) findViewById(R.id.btn_function);
leaveImg = (ImageView) findViewById(R.id.leave_img);
btn_dr = (TextView) findViewById(R.id.btn_dr);
mBanner = (Banner) findViewById(R.id.banner);
mBtnFunction.setImageDrawable(mDrawable0);
@@ -153,9 +156,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
btn_start_dr_pk.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(pk_nub<= 0){
if (pk_nub <= 0) {
ToastUtil.show("多人PK次数已用完");
}else{
} else {
//開始多人PK
HttpClient.getInstance().get("live.startDRPK", "live.startDRPK")
.params("roomid", CommonAppConfig.getInstance().getUid())
@@ -217,9 +220,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
if (yaoqing.size() < 3) {
if (PKing == false) {
if(isSw){
if (isSw) {
((LiveSwAnchorActivity) mContext).openLinkMicAnchorWindow(true);
}else{
} else {
((LiveRyAnchorActivity) mContext).openLinkMicAnchorWindow(true);
}
} else {
@@ -245,7 +248,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
yaoqing.put(numinda, numinda);
}
public void removeYaoqing(String numinda){
public void removeYaoqing(String numinda) {
yaoqing.remove(numinda);
}
@@ -295,9 +298,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
* 关闭直播
*/
private void close() {
if(isSw){
if (isSw) {
((LiveSwAnchorActivity) mContext).closeLive();
}else{
} else {
((LiveRyAnchorActivity) mContext).closeLive();
}
}
@@ -315,9 +318,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
if (mBtnFunction != null) {
mBtnFunction.setImageDrawable(mDrawable1);
}
if(isSw){
if (isSw) {
((LiveSwAnchorActivity) mContext).showFunctionDialog();
}else{
} else {
((LiveRyAnchorActivity) mContext).showFunctionDialog();
}
}
@@ -352,9 +355,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
* 发起主播连麦pk
*/
private void applyLinkMicPk() {
if(isSw){
if (isSw) {
((LiveSwAnchorActivity) mContext).applyLinkMicPk();
}else{
} else {
((LiveRyAnchorActivity) mContext).applyLinkMicPk();
}
}
@@ -689,6 +692,10 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
private final int WHAT_ANCHOR_LIVE_TIME = 3;//直播间主播计时
public void setLeaveFlag(boolean leave) {
leaveImg.setVisibility(leave ? View.VISIBLE : View.GONE);
}
private class LiveRoomHandler extends Handler {
@Override
public void handleMessage(Message msg) {

View File

@@ -672,6 +672,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (LivePlaySwViewHolder.leave != null) {
LivePlaySwViewHolder.leave.setVisibility(View.VISIBLE);
}
if (LivePlayRyViewHolder.leave != null) {
LivePlayRyViewHolder.leave.setVisibility(View.VISIBLE);
}
}
//判断是否有连麦,要显示连麦窗口
String linkMicUid = data.getEnterRoomInfo().getLinkmicUid();
@@ -700,7 +703,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (mLivePlayViewHolder != null && data.getEnterRoomInfo().getIsconnection() != null && data.getEnterRoomInfo().getIsconnection().equals("1")) {
JSONArray array = pkInfo.getJSONArray("userlist");
//判断是否是多人连麦
if (array!=null&& !array.isEmpty()) {//多人連麥
if (array != null && !array.isEmpty()) {//多人連麥
if (mLivePlayViewHolder != null) {
List<DrPkbean> drPkbeans = new ArrayList<>();
for (int j = 0; j < array.size(); j++) {
@@ -786,8 +789,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
if (mLivePlayViewHolder != null) {
JSONArray array = pkInfo.getJSONArray("userlist");
if(array==null){
array=new JSONArray();
if (array == null) {
array = new JSONArray();
}
List<DrPkbean> drPkbeans = new ArrayList<>();
for (int j = 0; j < array.size(); j++) {
@@ -2393,8 +2396,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
* @param time
*/
public void upDataPkScore(JSONArray pkScores, int time) {
L.eSw("upDataPkScore" + time+"|"+pkScores);
if(pkScores==null){
L.eSw("upDataPkScore" + time + "|" + pkScores);
if (pkScores == null) {
return;
}
this.pkScores = pkScores;

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -54,5 +55,6 @@
android:layout_marginBottom="45dp"
android:scaleType="fitXY"
android:src="@mipmap/zslk"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>

View File

@@ -39,8 +39,8 @@
<ImageView
android:id="@+id/leave"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
android:src="@mipmap/zslk"

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:layout_gravity="bottom"
android:orientation="vertical">
@@ -154,6 +155,14 @@
android:layout_height="45dp"
android:layout_gravity="bottom">
<ImageView
android:id="@+id/leave_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="matrix"
android:src="@mipmap/zslk"
android:visibility="gone"
tools:visibility="visible" />
<ImageView
android:id="@+id/btn_close"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB