修复声网下播后小窗还有流的问题

This commit is contained in:
zlzw 2024-07-22 18:21:25 +08:00
parent b5d4b88753
commit 520491a804
7 changed files with 28 additions and 43 deletions

View File

@ -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'

View File

@ -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);

View File

@ -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() {

View File

@ -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"
]

View File

@ -42,7 +42,7 @@ import io.rong.imlib.model.Message;
import io.rong.message.TextMessage;
/**
* 声网主播管理类
* 声网用户管理类
*/
public class SWAuManager extends BaseCacheManager {

View File

@ -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
@ -1254,9 +1235,9 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
.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);
}
@ -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);
}
}

View File

@ -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);