From 26a71ff82560caf1bf081ce616f963d80f3b3169 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Wed, 22 May 2024 18:29:11 +0800 Subject: [PATCH] =?UTF-8?q?fix[=E5=A3=B0=E6=9C=9B=E5=8D=87=E7=BA=A7-?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beautyapi/faceunity/agora/SWManager.java | 1 - .../yunbao/live/socket/SocketSwChatUtil.java | 48 +++++++++---------- .../yunbao/live/socket/SocketSwClient.java | 1 + .../live/views/LivePlaySwViewHolder.java | 6 +-- 4 files changed, 26 insertions(+), 30 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 93ba3273d..3bf15d9d8 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 @@ -127,7 +127,6 @@ public class SWManager extends BaseCacheManager { anchorContainer.addView(surfaceView); Config config = new Config(mContext, mRtcEngine, FURenderer.INSTANCE.mFURenderKit, null, CaptureMode.Agora, 0, false, new CameraConfig(MirrorMode.MIRROR_NONE, MirrorMode.MIRROR_NONE)); faceUnityBeautyAPI.initialize(config); - faceUnityBeautyAPI.enable(false); faceUnityBeautyAPI.setBeautyPreset(BeautyPreset.CUSTOM); //FaceUnityBeautyManage.getInstance().mFURenderKit.setFaceBeauty(); diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java index c1f1228e6..91f5e2239 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java @@ -64,8 +64,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } @Override @@ -128,8 +128,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } LiveNetManager.get(CommonAppContext.sInstance) .addChatCount(LiveActivity.mStream, new com.yunbao.common.http.base.HttpCallback() { @@ -214,8 +214,8 @@ public class SocketSwChatUtil { } } }); - if (SocketRyClient.mSocketHandler != null) - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } @Override @@ -263,8 +263,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -400,8 +400,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -470,8 +470,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -517,8 +517,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -554,8 +554,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -597,8 +597,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } @Override @@ -634,8 +634,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -674,8 +674,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } @@ -778,8 +778,8 @@ public class SocketSwChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketSwClient.mSocketHandler != null) { + SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java index aec44def7..f54c8eb66 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java @@ -1348,6 +1348,7 @@ public class SocketSwClient { .param("msgtype", 2) .param("uid", CommonAppConfig.getInstance().getUid()) .param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) + .param("random_pk", "1") .param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); msg1.create(); diff --git a/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java index 2dbe65889..39ec37fa7 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java @@ -1086,11 +1086,7 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder { public void UsertoRY() { userinputStreamList.clear(); Log.e("ry", "主播同意了UsertoRY"); - if (userJoinLinkMic) {//已经在房间内,不再joinRoom直接去连麦 - //subscribeMic(rcrtcRoom); - joinLiveMic(); - return; - } + joinLiveMic(); /*RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create() // 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO .setRoomType(RCRTCRoomType.LIVE_AUDIO_VIDEO).setLiveRole(RCRTCLiveRole.AUDIENCE).build();