From 11e0d62dde28112244012cd1f4941be180b60630 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 13 Sep 2024 09:53:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java | 2 +- config.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java b/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java index d47fb5a1f..a1a81f580 100644 --- a/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java +++ b/IAP6Helper/src/main/java/com/samsung/utils/SamsungUtil.java @@ -40,7 +40,7 @@ public class SamsungUtil { public void init() { iapHelper = IapHelper.getInstance(mContext); //设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式 - iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST); + iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION); } public void dispose() { diff --git a/config.gradle b/config.gradle index beb9df9ca..e971555bb 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 23, targetSdkVersion : 34, - versionCode : 697, + versionCode : 698, versionName : "6.8.1" ] manifestPlaceholders = [ From 0937186c9331313ad6f1f0660f2becc209b844fe Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Fri, 13 Sep 2024 09:56:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E7=89=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-zh/strings.xml | 6 ++---- common/src/main/res/values/strings.xml | 6 ++---- .../main/res/mipmap-xxxhdpi/login_twitter.png | Bin 8631 -> 6068 bytes 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index d662a1d4c..7025e1357 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -830,10 +830,8 @@ 2011402032399020 959584e054a33614996361f0044e5253 - ui10vIggex2F043HnztYNuA3g - J8jvBBeJoZbVojbkWUrvsj0K0UUkuV69CqQ7CEobhJn6tvAKpQ - F8t7PgspJ8Xl2k09ccqmnmynf - aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + JDd7XEXrOkLcx0KkkJGUbD4MQ + TSRRRFvK8bOTZ3hfRq2omp5dEXcrMUeJ0WVH0dJa5EJAGZLTrE 1527128092082286592-NfYVOcHXy630vYUj4nMlDPh8PsVBHE U5avdnRMb7yON6sYp4SAb1I99mFD8ch9KHIuFbEbd0IDN diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 7a95a9e4f..31ff8afe0 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -790,10 +790,8 @@ 2011402032399020 959584e054a33614996361f0044e5253 - ui10vIggex2F043HnztYNuA3g - J8jvBBeJoZbVojbkWUrvsj0K0UUkuV69CqQ7CEobhJn6tvAKpQ - ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ - aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + JDd7XEXrOkLcx0KkkJGUbD4MQ + TSRRRFvK8bOTZ3hfRq2omp5dEXcrMUeJ0WVH0dJa5EJAGZLTrE 1527128092082286592-NfYVOcHXy630vYUj4nMlDPh8PsVBHE U5avdnRMb7yON6sYp4SAb1I99mFD8ch9KHIuFbEbd0IDN diff --git a/main/src/main/res/mipmap-xxxhdpi/login_tw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0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 1 + common/build.gradle | 1 + .../manager/game/BilliardsRandomManager.java | 6 +- .../yunbao/common/utils/ProcessImageUtil.java | 57 +++++++- .../com/yunbao/common/utils/WordUtil.java | 4 +- dependencies.gradle | 2 +- .../live/adapter/LiveReportAdapter.java | 2 +- .../live/views/LiveNewReadyRyViewHolder.java | 4 +- .../live/views/LiveNewReadySwViewHolder.java | 4 +- .../live/views/LiveReadyRyViewHolder.java | 5 +- .../live/views/LiveReadyViewHolder.java | 4 +- live/src/main/res/layout/view_live_room.xml | 10 +- .../main/activity/EditProfileActivity.java | 2 +- .../main/activity/FeedbackEditActivity.java | 4 +- .../yunbao/main/activity/MainActivity.java | 7 + .../main/activity/MyWebViewActivity.java | 2 +- .../main/activity/OneLoginActivity.java | 2 +- .../main/dialog/MainStartDialogFragment.java | 22 ++- .../video/views/VideoPlayViewHolder.java | 132 ++++++++++++------ video/src/main/res/layout/view_video_play.xml | 10 +- 20 files changed, 198 insertions(+), 83 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1bc022949..628ac676e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -54,6 +54,7 @@ + diff --git a/common/build.gradle b/common/build.gradle index 7968f2e9e..27b4ed16b 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -86,6 +86,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) api files('libs/jcc-bate-0.7.3.jar') compileOnly fileTree(dir: '../libs', include: ['*.aar']) + api 'androidx.activity:activity:1.9.1' api rootProject.ext.dependencies["appcompat-androidx"] api rootProject.ext.dependencies["recyclerview-androidx"] api rootProject.ext.dependencies["cardview-androidx"] diff --git a/common/src/main/java/com/yunbao/common/manager/game/BilliardsRandomManager.java b/common/src/main/java/com/yunbao/common/manager/game/BilliardsRandomManager.java index fe94ccbc9..3e1899941 100644 --- a/common/src/main/java/com/yunbao/common/manager/game/BilliardsRandomManager.java +++ b/common/src/main/java/com/yunbao/common/manager/game/BilliardsRandomManager.java @@ -145,6 +145,9 @@ public class BilliardsRandomManager extends AbsRandomGameManager { if (event.getSudMGPMGState().equals(SudMGPMGState.MG_GAME_LOAD_OVER)) { joinAiRobot(); } + if(SudMGPMGState.MG_COMMON_GAME_STATE.equals(event.getSudMGPMGState())){ + reset(); + } if (event.getSudMGPMGState().equals(SudMGPMGState.MG_COMMON_PLAYER_IN)) { LogUtils.e("收到的回调: AI uid = " + getAiUid() + "| kickUid = " + event.getPlayerIn().kickUID + "|" + getPlayerSize()); if (event.getPlayerIn().reason == 1 && aiInfo != null) { @@ -185,7 +188,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager { @Override public void onGameMGCommonGameBilliardsHitState(SudMGPMGState.MGCommonGameBilliardsHitState model) { - LogUtils.e("uid:"+model.uid,"state:"+model.state); + LogUtils.e("uid:"+model.uid,"state:"+model.state,"isOneOverForMy:"+isOneOverForMy,"isOneOverForOther:"+isOneOverForOther); if (Integer.parseInt(model.uid) == IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()) { if (isOneOverForMy == -1) { isOneOverForMy = 1; @@ -282,6 +285,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager { } private void onSendNotOneOver() { + ToastUtil.showDebug("标记丢失一杆清台"); LiveNetManager.get(AppManager.getInstance().getMainActivity()) .ballClearanceTableStatus(data.getSudGameRoomId(), new HttpCallback() { @Override diff --git a/common/src/main/java/com/yunbao/common/utils/ProcessImageUtil.java b/common/src/main/java/com/yunbao/common/utils/ProcessImageUtil.java index 05f096263..99de44a79 100644 --- a/common/src/main/java/com/yunbao/common/utils/ProcessImageUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/ProcessImageUtil.java @@ -3,13 +3,20 @@ package com.yunbao.common.utils; import android.Manifest; import android.content.Context; import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.ImageDecoder; import android.net.Uri; import android.os.Build; import android.provider.MediaStore; +import androidx.activity.result.ActivityResultLauncher; +import androidx.activity.result.PickVisualMediaRequest; +import androidx.activity.result.contract.ActivityResultContracts; +import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.FragmentActivity; import androidx.core.content.FileProvider; +import com.blankj.utilcode.util.LogUtils; import com.yalantis.ucrop.UCrop; import com.yalantis.ucrop.util.FileUtils; import com.yunbao.common.CommonAppConfig; @@ -39,6 +46,7 @@ public class ProcessImageUtil extends ProcessResultUtil { private ImageResultCallback mResultCallback; private boolean mNeedCrop;//是否需要裁剪 private boolean mNeedGif;//允许gif图 + ActivityResultLauncher launcher; public void setNeedGif(boolean mNeedGif) { this.mNeedGif = mNeedGif; @@ -83,7 +91,7 @@ public class ProcessImageUtil extends ProcessResultUtil { if (mNeedCrop) { Uri uri = null; if (Build.VERSION.SDK_INT >= 24) { - uri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCameraResult); + uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCameraResult); } else { uri = Uri.fromFile(mCameraResult); } @@ -117,6 +125,19 @@ public class ProcessImageUtil extends ProcessResultUtil { return; } String path = FileUtils.getPath(mContext, intent.getData()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + ImageDecoder.Source source = ImageDecoder.createSource(mContext.getContentResolver(), intent.getData()); + try { + Bitmap bitmap = ImageDecoder.decodeBitmap(source); + path=BitmapUtil.getInstance().saveBitmap(bitmap); + bitmap.recycle(); + } catch (Exception e) { + e.printStackTrace(); + mResultCallback.onFailure(); + return; + } + + } File file = new File(path); if (file.exists()) { mResultCallback.onSuccess(file); @@ -153,6 +174,19 @@ public class ProcessImageUtil extends ProcessResultUtil { } } }; + launcher = ((AppCompatActivity) mContext).registerForActivityResult(new ActivityResultContracts.PickVisualMedia(), new androidx.activity.result.ActivityResultCallback() { + @Override + public void onActivityResult(Uri result) { + LogUtils.e("result:" + result); + if (result == null) { + mAlumbResultCallback.onFailure(); + return; + } + Intent intent = new Intent(); + intent.setData(result); + mAlumbResultCallback.onSuccess(intent); + } + }); } /** @@ -173,15 +207,28 @@ public class ProcessImageUtil extends ProcessResultUtil { /** * 相册获取图片 */ - public void getImageByAlumb() { + public void getImageByAlbum() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + showSystemPick(); + return; + } requestPermissions(mAlumbPermissions, mAlumbPermissionCallback); } - public void getImageByAlumb(boolean needCrop) { + public void getImageByAlbum(boolean needCrop) { this.mNeedCrop = needCrop; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + showSystemPick(); + return; + } requestPermissions(mAlumbPermissions, mAlumbPermissionCallback); } + private void showSystemPick() { + PickVisualMediaRequest.Builder builder = new PickVisualMediaRequest.Builder() + .setMediaType(ActivityResultContracts.PickVisualMedia.ImageOnly.INSTANCE); + launcher.launch(builder.build()); + } /** * 开启摄像头,执行照相 @@ -195,7 +242,7 @@ public class ProcessImageUtil extends ProcessResultUtil { mCameraResult = getNewFile(); Uri uri = null; if (Build.VERSION.SDK_INT >= 24) { - uri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCameraResult); + uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCameraResult); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION); } else { uri = Uri.fromFile(mCameraResult); @@ -255,7 +302,7 @@ public class ProcessImageUtil extends ProcessResultUtil { startActivityForResult(intent, mCropResultCallback); } catch (Exception e) { try { - Uri resultUri = FileProvider.getUriForFile(mContext, mContext.getPackageName()+".fileprovider", mCorpResult); + Uri resultUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCorpResult); if (resultUri == null || mFragment == null || mContext == null) { return; } diff --git a/common/src/main/java/com/yunbao/common/utils/WordUtil.java b/common/src/main/java/com/yunbao/common/utils/WordUtil.java index 52f651070..2706d32cd 100644 --- a/common/src/main/java/com/yunbao/common/utils/WordUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/WordUtil.java @@ -35,7 +35,9 @@ public class WordUtil { public static boolean isNewZh() { return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE - || IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.TRADITIONAL_CHINESE ; + || IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.TRADITIONAL_CHINESE + || IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.CHINESE + || IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.CHINA; } public static String getNewString(int res) { diff --git a/dependencies.gradle b/dependencies.gradle index fd32a5d29..740ce8126 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -22,7 +22,7 @@ ext { // "tencent-bugly" : 'com.tencent.bugly:crashreport:2.6.6',//腾讯bugly // "umeng-common" : 'com.umeng.sdk:common:1.5.3',//友盟统计 // "umeng-analytics" : 'com.umeng.sdk:analytics:7.5.3',//友盟统计 - "ucrop" : 'com.github.yalantis:ucrop:2.2.3',//图片裁剪 + "ucrop" : 'com.github.yalantis:ucrop:2.2.9',//图片裁剪 "smartRefreshLayout" : 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-20',//下拉刷新上拉加载 "magicIndicator" : 'com.github.hackware1993:MagicIndicator:1.6.0',//ViewPager指示器 "banner" : 'com.ms:banner:1.0.0',//轮播图 diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java index 129445c10..052e063fa 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java @@ -237,7 +237,7 @@ public class LiveReportAdapter extends RecyclerView.Adapter { if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java index efdacdffc..6def839ff 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java @@ -691,7 +691,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl */ private void setAvatar() { if (mLiveSdk == Constants.LIVE_SDK_TX) { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } else { DialogUitl.showStringArrayDialog(mContext, new Integer[]{ R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { @@ -700,7 +700,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java index 3d949e264..0be3d139a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java @@ -673,7 +673,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl */ private void setAvatar() { if (mLiveSdk == Constants.LIVE_SDK_TX) { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(true); } else { DialogUitl.showStringArrayDialog(mContext, new Integer[]{ R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { @@ -682,7 +682,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(true); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java index 8d44d530f..6e26b6276 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveReadyRyViewHolder.java @@ -35,7 +35,6 @@ import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveChooseClassActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; -import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.adapter.LiveReadyShareAdapter; import com.yunbao.common.bean.LiveRoomTypeBean; import com.yunbao.live.dialog.LiveRoomTypeDialogFragment; @@ -262,7 +261,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick */ private void setAvatar() { if (mLiveSdk == Constants.LIVE_SDK_TX) { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } else { DialogUitl.showStringArrayDialog(mContext, new Integer[]{ R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { @@ -271,7 +270,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java index a19123a46..6f88ab017 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveReadyViewHolder.java @@ -285,7 +285,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi */ private void setAvatar() { if (mLiveSdk == Constants.LIVE_SDK_TX) { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } else { DialogUitl.showStringArrayDialog(mContext, new Integer[]{ R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { @@ -294,7 +294,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index de45e45ae..d6f9621b3 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -2208,11 +2208,6 @@ - + diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index e540e924f..0881d7c37 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -439,7 +439,7 @@ public class EditProfileActivity extends AbsActivity { if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else if (tag == R.string.alumb) { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(true); } else { RouteUtil.forwardUserAvatarSelect(); } diff --git a/main/src/main/java/com/yunbao/main/activity/FeedbackEditActivity.java b/main/src/main/java/com/yunbao/main/activity/FeedbackEditActivity.java index 61a3df228..0e654e3a7 100644 --- a/main/src/main/java/com/yunbao/main/activity/FeedbackEditActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/FeedbackEditActivity.java @@ -33,8 +33,6 @@ import com.yunbao.main.R; import java.io.File; import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; @Route(path = RouteUtil.PATH_FEEDBACK_EDIT_ACTIVITY) public class FeedbackEditActivity extends AbsActivity { @@ -299,7 +297,7 @@ public class FeedbackEditActivity extends AbsActivity { loadingDialog = DialogUitl.loadingDialog(mContext); loadingDialog.show(); if (tag == 1) { - imageUtil.getImageByAlumb(false); + imageUtil.getImageByAlbum(false); } else { imageUtil.getImageByCamera(false); } diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 9ecc1d7f4..b002e65f9 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -44,6 +44,7 @@ import androidx.viewpager.widget.ViewPager; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.blankj.utilcode.util.LogUtils; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.jakewharton.rxbinding3.view.RxView; @@ -55,6 +56,7 @@ import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.QiniuLog; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.server.DownloadService; @@ -232,6 +234,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override protected void main() { + LogUtils.e("MainActivity", + "语言:"+IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage(), + "测试文本:"+getString(R.string.hot) + ); + ToastUtil.showDebug("打包时间:"+CommonAppConfig.BUILD_TIME+"\n系统语言:"+IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage()); //初始化声网 SWAuManager.get().initRtcEngine(this); ActivityCompat.postponeEnterTransition(this); diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java index 729e0323d..15e4b55b1 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java @@ -585,7 +585,7 @@ public class MyWebViewActivity extends AbsActivity { if (tag == com.yunbao.main.R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java index eade89493..c862ccf60 100644 --- a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java @@ -49,7 +49,7 @@ public class OneLoginActivity extends AbsActivity { if (tag == R.string.camera) { mImageUtil.getImageByCamera(); } else { - mImageUtil.getImageByAlumb(); + mImageUtil.getImageByAlbum(); } } }); diff --git a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java index 7c8da569f..ef1e11ec5 100644 --- a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java +++ b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java @@ -169,7 +169,12 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O boolean isAnchor = IMLoginManager.get(mContext).getUserInfo().anchorUserType(); if (isAnchor) { String[] permissions; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + permissions = new String[]{ + Manifest.permission.CAMERA, + Manifest.permission.RECORD_AUDIO + }; + } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.TIRAMISU) { permissions = new String[]{ Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.CAMERA, @@ -195,7 +200,12 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O boolean isAnchor = IMLoginManager.get(mContext).getUserInfo().anchorUserType(); if (isAnchor) { String[] permissions; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + permissions = new String[]{ + Manifest.permission.CAMERA, + Manifest.permission.RECORD_AUDIO + }; + } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.TIRAMISU) { permissions = new String[]{ Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.CAMERA, @@ -234,9 +244,9 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O JSONObject obj = JSON.parseObject(info[0]); JSONObject obj1 = JSON.parseObject(info1[0]); try { - if(code==201){ //声网 + if (code == 201) { //声网 LiveSwAnchorActivity.forward(mContext, Constants.LIVE_SDK_SW, JSON.parseObject(obj.getString("android"), LiveKsyConfigBean.class)); - }else if(code==200){//融云 + } else if (code == 200) {//融云 LiveRyAnchorActivity.forward(mContext, obj.getIntValue("live_sdk"), JSON.parseObject(obj.getString("android"), LiveKsyConfigBean.class)); } } catch (Exception e) { @@ -309,7 +319,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O if (i == R.id.btn_close) { } else if (i == R.id.btn_live) { if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) { - ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。": + ToastUtil.show(WordUtil.isNewZh() ? "檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。" : "It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast."); } else { if (mCallback != null) { @@ -324,6 +334,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O } } } + private boolean isWifiProxy(Context context) { final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH; String proxyAddress; @@ -345,6 +356,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O boolean isVpnConn = networkInfo == null ? false : networkInfo.isConnected(); return isVpnConn; } + @Override public void onDestroy() { super.onDestroy(); diff --git a/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java b/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java index 1750df210..b4e4f93b3 100644 --- a/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java +++ b/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java @@ -10,11 +10,19 @@ import android.view.ViewGroup; import android.view.animation.AccelerateInterpolator; import android.widget.RelativeLayout; -import com.tencent.rtmp.ITXVodPlayListener; +import androidx.annotation.Nullable; + +import com.blankj.utilcode.util.LogUtils; +import com.google.android.exoplayer2.C; +import com.google.android.exoplayer2.DefaultLoadControl; +import com.google.android.exoplayer2.ExoPlayer; +import com.google.android.exoplayer2.MediaItem; +import com.google.android.exoplayer2.PlaybackException; +import com.google.android.exoplayer2.Player; +import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; +import com.google.android.exoplayer2.ui.StyledPlayerView; +import com.google.android.exoplayer2.video.VideoSize; import com.tencent.rtmp.TXLiveConstants; -import com.tencent.rtmp.TXVodPlayConfig; -import com.tencent.rtmp.TXVodPlayer; -import com.tencent.rtmp.ui.TXCloudVideoView; import com.yunbao.common.utils.L; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.video.R; @@ -27,11 +35,11 @@ import com.yunbao.video.http.VideoHttpUtil; * 视频播放器 */ -public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayListener, View.OnClickListener { +public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickListener { - private TXCloudVideoView mTXCloudVideoView; + private StyledPlayerView mTXCloudVideoView; private View mVideoCover; - private TXVodPlayer mPlayer; + private ExoPlayer mPlayer; private boolean mPaused;//生命周期暂停 private boolean mClickPaused;//点击暂停 private ActionListener mActionListener; @@ -41,7 +49,6 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList private boolean mEndPlay; private VideoBean mVideoBean; private String mCachePath; - private TXVodPlayConfig mTXVodPlayConfig; public VideoPlayViewHolder(Context context, ViewGroup parentView) { super(context, parentView); @@ -55,17 +62,21 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList @Override public void init() { + DefaultLoadControl control = new DefaultLoadControl.Builder() + .setPrioritizeTimeOverSizeThresholds(false) + .setBackBuffer(10_000, true) + .setBufferDurationsMs(500, + 5_000, + 150, + 200) + .build(); + mCachePath = mContext.getCacheDir().getAbsolutePath(); - mTXCloudVideoView = (TXCloudVideoView) findViewById(R.id.video_view); - mTXCloudVideoView.setRenderMode(TXLiveConstants.RENDER_MODE_FULL_FILL_SCREEN); - mPlayer = new TXVodPlayer(mContext); - mTXVodPlayConfig = new TXVodPlayConfig(); - mTXVodPlayConfig.setMaxCacheItems(15); - mTXVodPlayConfig.setProgressInterval(200); - mPlayer.setConfig(mTXVodPlayConfig); - mPlayer.setAutoPlay(true); - mPlayer.setVodListener(this); - mPlayer.setPlayerView(mTXCloudVideoView); + mTXCloudVideoView = (StyledPlayerView) findViewById(R.id.placeholderView); + mTXCloudVideoView.setKeepContentOnPlayerReset(true); + mTXCloudVideoView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FIXED_WIDTH); + mPlayer = new ExoPlayer.Builder(mContext).setLoadControl(control).build(); + mPlayer.setVideoScalingMode(C.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING); findViewById(R.id.root).setOnClickListener(this); mVideoCover = findViewById(R.id.video_cover); mPlayBtn = findViewById(R.id.btn_play); @@ -76,13 +87,59 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList PropertyValuesHolder.ofFloat("alpha", 0f, 1f)); mPlayBtnAnimator.setDuration(150); mPlayBtnAnimator.setInterpolator(new AccelerateInterpolator()); + mPlayer.addListener(new Player.Listener() { + @Override + public void onIsPlayingChanged(boolean isPlaying) { + Player.Listener.super.onIsPlayingChanged(isPlaying); + } + + @Override + public void onPlaybackStateChanged(int playbackState) { + Player.Listener.super.onPlaybackStateChanged(playbackState); + if (playbackState == Player.STATE_READY) { + mPlayer.play(); + onPlayEvent(TXLiveConstants.PLAY_EVT_PLAY_BEGIN, null); + } else if (playbackState == Player.STATE_BUFFERING) { + onPlayEvent(TXLiveConstants.PLAY_EVT_PLAY_LOADING, null); + } else if (playbackState == Player.STATE_ENDED) { + onPlayEvent(TXLiveConstants.PLAY_EVT_PLAY_END, null); + } + } + + @Override + public void onVideoSizeChanged(VideoSize videoSize) { + Player.Listener.super.onVideoSizeChanged(videoSize); + Bundle bundle = new Bundle(); + bundle.putInt("EVT_PARAM1", videoSize.width); + bundle.putInt("EVT_PARAM2", videoSize.height); + onPlayEvent(TXLiveConstants.PLAY_EVT_CHANGE_RESOLUTION, bundle); + } + + @Override + public void onRenderedFirstFrame() { + Player.Listener.super.onRenderedFirstFrame(); + onPlayEvent(TXLiveConstants.PLAY_EVT_RCV_FIRST_I_FRAME, null); + } + + @Override + public void onPlayerError(PlaybackException error) { + Player.Listener.super.onPlayerError(error); + LogUtils.e(error); + } + + @Override + public void onPlayerErrorChanged(@Nullable PlaybackException error) { + Player.Listener.super.onPlayerErrorChanged(error); + LogUtils.e(error); + } + }); + mTXCloudVideoView.setPlayer(mPlayer); } /** * 播放器事件回调 */ - @Override - public void onPlayEvent(TXVodPlayer txVodPlayer, int e, Bundle bundle) { + public void onPlayEvent(int e, Bundle bundle) { switch (e) { case TXLiveConstants.PLAY_EVT_PLAY_BEGIN://加载完成,开始播放的回调 mStartPlay = true; @@ -119,11 +176,6 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList } } - @Override - public void onNetStatus(TXVodPlayer txVodPlayer, Bundle bundle) { - - } - /** * 获取到视频宽高回调 */ @@ -166,20 +218,8 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList if (TextUtils.isEmpty(url)) { return; } - if (mTXVodPlayConfig == null) { - mTXVodPlayConfig = new TXVodPlayConfig(); - mTXVodPlayConfig.setMaxCacheItems(15); - mTXVodPlayConfig.setProgressInterval(200); - } - if (url.endsWith(".m3u8")) { - mTXVodPlayConfig.setCacheFolderPath(null); - } else { - mTXVodPlayConfig.setCacheFolderPath(mCachePath); - } - mPlayer.setConfig(mTXVodPlayConfig); - if (mPlayer != null) { - mPlayer.startPlay(url); - } + mPlayer.setMediaItem(MediaItem.fromUri(url)); + mPlayer.prepare(); VideoHttpUtil.videoWatchStart(videoBean.getUid(), videoBean.getId()); } @@ -188,7 +228,7 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList */ public void stopPlay() { if (mPlayer != null) { - mPlayer.stopPlay(false); + mPlayer.stop(); } } @@ -197,8 +237,8 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList */ private void replay() { if (mPlayer != null) { - mPlayer.seek(0); - mPlayer.resume(); + mPlayer.seekTo(0); + mPlayer.play(); } } @@ -206,8 +246,8 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList VideoHttpUtil.cancel(VideoHttpConsts.VIDEO_WATCH_START); VideoHttpUtil.cancel(VideoHttpConsts.VIDEO_WATCH_END); if (mPlayer != null) { - mPlayer.stopPlay(false); - mPlayer.setPlayListener(null); + mPlayer.stop(); + mPlayer.release(); } mPlayer = null; mActionListener = null; @@ -229,7 +269,7 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList public void resumePlay() { if (mPaused) { if (!mClickPaused && mPlayer != null) { - mPlayer.resume(); + mPlayer.play(); } } mPaused = false; @@ -263,7 +303,7 @@ public class VideoPlayViewHolder extends AbsViewHolder implements ITXVodPlayList } if (mPlayer != null) { if (mClickPaused) { - mPlayer.resume(); + mPlayer.play(); } else { mPlayer.pause(); } diff --git a/video/src/main/res/layout/view_video_play.xml b/video/src/main/res/layout/view_video_play.xml index 1dcc7b312..cae32a34e 100644 --- a/video/src/main/res/layout/view_video_play.xml +++ b/video/src/main/res/layout/view_video_play.xml @@ -1,11 +1,15 @@ - @@ -14,7 +18,7 @@ android:id="@+id/video_cover" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#000" /> + android:background="@color/transparent" /> Date: Fri, 13 Sep 2024 14:26:32 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=90=8E=E6=91=84=E5=83=8F=E5=A4=B4=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beautyapi/faceunity/agora/SWManager.java | 22 +++++++++++++++++- .../live/views/LivePushSwViewHolder.java | 23 +++++++++++-------- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java index 36da5c70f..b6fcc0969 100644 --- a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java +++ b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java @@ -5,13 +5,16 @@ import android.content.ContentResolver; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; +import android.hardware.camera2.CameraManager; import android.net.Uri; import android.text.TextUtils; import android.view.SurfaceView; import android.widget.FrameLayout; +import androidx.annotation.NonNull; import androidx.core.content.res.ResourcesCompat; +import com.blankj.utilcode.util.LogUtils; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.SwTokenModel; @@ -69,6 +72,7 @@ public class SWManager extends BaseCacheManager { private ImageTrackOptions imageTrackOptions = null; private onDrPkJoinSuccessListener onDrPkJoinSuccessListener; + String openCameraId = "1"; public void setOnDrPkJoinSuccessListener(SWManager.onDrPkJoinSuccessListener onDrPkJoinSuccessListener) { this.onDrPkJoinSuccessListener = onDrPkJoinSuccessListener; @@ -253,7 +257,20 @@ public class SWManager extends BaseCacheManager { */ public void switchCamera() { if (mRtcEngine != null) { - mRtcEngine.switchCamera(); + if (openCameraId.equals("0")) { + mRtcEngine.switchCamera("1"); + openCameraId = "1"; + } else { + mRtcEngine.switchCamera("0"); + openCameraId = "0"; + } + } + } + + public void resetCamera() { + LogUtils.e("重置摄像头", openCameraId); + if (mRtcEngine != null && !TextUtils.isEmpty(openCameraId)) { + mRtcEngine.switchCamera(openCameraId); } } @@ -525,6 +542,9 @@ public class SWManager extends BaseCacheManager { }); } + public void release() { + } + public interface onRtcEngineListener { void onOpenSuccess(String channel, int uid); diff --git a/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java index 6f1ba0358..add57ceb0 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushSwViewHolder.java @@ -370,7 +370,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } switch (temp) { case 2: - swManager.joinChannelDrEx(dr2_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr2_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); swManager.updateMyChannelView(dr1_preview); mBigContainer.removeAllViews(); @@ -379,7 +379,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX break; case 3: drpkUid3 = uid; - swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); dr3_preview.setVisibility(View.GONE); dr4_preview.setVisibility(View.VISIBLE); break; @@ -387,9 +387,9 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX dr3_preview.setVisibility(View.VISIBLE); //先退出这个主播的直播间,在进入该直播间,(视图问题暂时這樣處理) swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), drpkUid3); - swManager.joinChannelDrEx(dr3_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, drpkUid3, SWAuManager.getChannelName(drpkUid3),temp); + swManager.joinChannelDrEx(dr3_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, drpkUid3, SWAuManager.getChannelName(drpkUid3), temp); - swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid),temp); + swManager.joinChannelDrEx(dr4_preview, CommonAppConfig.getInstance().getUid(), CommonAppConfig.SWToken, uid, SWAuManager.getChannelName(uid), temp); break; } dr_pk_view.setVisibility(View.VISIBLE); @@ -399,7 +399,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } public void anchorClose() { - swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()),pkUid1); + swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), pkUid1); swManager.updateMyChannelView((FrameLayout) mBigContainer); //用户主动断开连麦再退出画面 mPkContainer.setVisibility(View.GONE); pkUid1 = null; @@ -504,8 +504,9 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX public void onResume() { mPaused = false; Log.i("摄像头", "onResume: " + isNeedOpenCamera); + swManager.resetCamera(); if (isNeedOpenCamera) { - RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() { + /*RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() { @Override public void onSuccess(Boolean data) { //设置摄像头最大缩放比例 @@ -519,7 +520,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX public void onFailed(RTCErrorCode errorCode) { Log.i("摄像头", "onFailed: 打开摄像头失败 " + errorCode); } - }); + });*/ } } @@ -550,6 +551,7 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX super.release(); Bus.getOff(this); onDestroy(); + SWManager.get().release(); LiveHttpUtil.cancel(LiveHttpConsts.LINK_MIC_TX_MIX_STREAM); rtcRoom = null; } @@ -667,17 +669,20 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX } } - public void closeLive(){ + public void closeLive() { if (swManager != null) { swManager.exitChannelAll(); } } - public interface onDrPkJoinSuccessListener{ + public interface onDrPkJoinSuccessListener { void joinSuccess1(); + void joinSuccess2(); + void joinSuccess3(); + void joinSuccess4(); }