diff --git a/common/build.gradle b/common/build.gradle index baf45358f..758311bf3 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -176,7 +176,7 @@ dependencies { //腾讯im api 'com.tencent.imsdk:imsdk-plus:5.4.666' api 'com.google.code.gson:gson:2.8.8' - api 'cn.rongcloud.sdk:rtc_lib:5.6.9' // 音视频通话基础能力库 + api 'cn.rongcloud.sdk:rtc_lib:5.7.0' // 音视频通话基础能力库 //此处以集成 5.1.2 版本为例 api 'cn.rongcloud.sdk:im_lib:5.7.0' diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index e01cf045d..f5f7ff5bb 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -88,6 +88,7 @@ public class WebViewActivity extends AbsActivity { @Override public void setStatusBar() { + super.setStatusBar(); // getWindow().setStatusBarColor(Color.parseColor("#FFFFFF")); // getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); diff --git a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java index 638334d48..1131cc919 100644 --- a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java +++ b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java @@ -3,6 +3,7 @@ package com.yunbao.common.bean; import com.google.gson.annotations.SerializedName; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.utils.StringUtil; +import com.yunbao.common.utils.WordUtil; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -122,7 +123,7 @@ public class OpenAdModel extends BaseModel { if (!url.startsWith("http://") && !url.startsWith("https://")) { url = CommonAppConfig.HOST + (url.startsWith("/") ? url : "/" + url); } - return url; + return url+"&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); } public String getOriginalUrl() { diff --git a/config.gradle b/config.gradle index 1272389ce..1207f13fe 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 23, targetSdkVersion : 34, - versionCode : 536, + versionCode : 537, versionName : "6.7.1", namespace : "com.pandoralive.shayu" ] diff --git a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWAuManager.java b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWAuManager.java index 43960605d..e4562b9dc 100644 --- a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWAuManager.java +++ b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWAuManager.java @@ -42,7 +42,7 @@ import io.rong.imlib.model.Message; import io.rong.message.TextMessage; /** - * 声网主播管理类 + * 声网用户管理类 */ public class SWAuManager extends BaseCacheManager { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index c5ac1a517..0ab19a14f 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -25,6 +25,7 @@ import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; + import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; @@ -218,7 +219,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl initFaceManager(); leave_img = findViewById(R.id.leave_img); mLiveSDK = intent.getIntExtra(Constants.LIVE_SDK, Constants.LIVE_SDK_KSY); - if(mLiveSDK ==Constants.LIVE_SDK_SW){ + if (mLiveSDK == Constants.LIVE_SDK_SW) { isSw = true; } mLiveKsyConfigBean = intent.getParcelableExtra(Constants.LIVE_KSY_CONFIG); @@ -367,7 +368,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { @Override public void OpenAndCloseListener() { - if(mLiveRoomViewHolder!=null){ + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.initPrankProgress(1); } } @@ -699,7 +700,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking()); bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime()); bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen()); - bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed()); + bundle.putBoolean("isShowZgRed", mLiveAnchorViewHolder.isShowMenuRed()); fragment.setArguments(bundle); fragment.setFunctionClickListener(this); fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment"); @@ -737,7 +738,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl public void openRandomPkWindow() { RandomPkDialogFragment fragment = new RandomPkDialogFragment(); Bundle bundle = new Bundle(); - bundle.putBoolean("isSw",true); + bundle.putBoolean("isSw", true); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "RandomPkDialogFragment"); } @@ -786,7 +787,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl } mLiveReadyViewHolder = null; if (mLiveRoomViewHolder == null) { - mLiveRoomViewHolder = new LiveRoomViewHolder(true, 2, mContext, mContainer, (GifImageView) findViewById(R.id.gift_gif), (SVGAImageView) findViewById(R.id.gift_svga), mContainerWrap, getWindowManager(),isSw); + mLiveRoomViewHolder = new LiveRoomViewHolder(true, 2, mContext, mContainer, (GifImageView) findViewById(R.id.gift_gif), (SVGAImageView) findViewById(R.id.gift_svga), mContainerWrap, getWindowManager(), isSw); mLiveRoomViewHolder.setManager(manager); mLiveRoomViewHolder.addToParent(); mLiveRoomViewHolder.subscribeActivityLifeCycle(); @@ -874,7 +875,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl MicedUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList(); //加载整蛊 - if(mLiveRoomViewHolder!=null){ + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.initPrankProgress(2); mLiveRoomViewHolder.sendMsgPrank(); } @@ -946,27 +947,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl * 结束直播 */ public void endLive() { - RCRTCEngine.getInstance().getDefaultVideoStream().stopCamera(new IRCRTCResultCallback() { - @Override - public void onSuccess() { - } - - @Override - public void onFailed(RTCErrorCode errorCode) { - - } - }); - RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() { - @Override - public void onSuccess() { - Log.i("ry", "退出成功"); - } - - @Override - public void onFailed(RTCErrorCode errorCode) { - Log.i("ry", "退出失败" + errorCode); - } - }); + SWManager.get().exitChannelAll(); //请求关播的接口 LiveHttpUtil.stopLive(mStream, new HttpCallback() { @Override @@ -1250,13 +1231,13 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl .param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()) .param("pkuid", pkUid) .param("uid", CommonAppConfig.getInstance().getUid()) - .param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) - .param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) - .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); + .param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) + .param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) + .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); //判断是否是随机PK - if(extra){ + if (extra) { msg1.param("random_pk", "1"); - msg1.param("msgtype","11"); + msg1.param("msgtype", "11"); if (RandomPkManager.getInstance().isRankModel()) { msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png"); } @@ -1311,7 +1292,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl } } - public void linkDrMicRemoveListUid(String uid){ + public void linkDrMicRemoveListUid(String uid) { if (mLiveAnchorViewHolder != null) { mLiveAnchorViewHolder.removeYaoqing(uid); } @@ -1342,8 +1323,8 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl .param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()) .param("pkuid", pkUid) .param("uid", CommonAppConfig.getInstance().getUid()) - .param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) - .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); + .param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) + .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); msg1.create(); String targetId = "g" + pkUid; @@ -1488,7 +1469,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl @Override public void onUpdatePrankProgress(String prankString) { - if (mLiveRoomViewHolder != null){ + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.refreshPrank(prankString); } } @@ -1679,7 +1660,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl case LEAVE_DR_ROOM: if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.seisShowGif(true); - if(DRPKing==1){ + if (DRPKing == 1) { mLiveRoomViewHolder.endDRGif(); } } @@ -1694,7 +1675,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl case LEAVE_PK_SCORE: if (mLiveSwLinkMicPkPresenter != null) { mLiveSwLinkMicPkPresenter.closeButtonGone(); - mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(),true); + mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(), true); } if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.seisShowGif(true); @@ -1980,10 +1961,11 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl } + @Subscribe(threadMode = ThreadMode.MAIN) public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) { if (mLiveRoomViewHolder != null) { - mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event,false); + mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event, false); } } diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index 8da5b78d7..75174c5ce 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -79,6 +79,7 @@ public class ZhuangBanActivity extends AbsActivity { @Override public void setStatusBar() { + super.setStatusBar(); // getWindow().setStatusBarColor(Color.parseColor("#FFFFFF")); // getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);