From 926a1a3cb626d51c8d0a19719231774b9584ea3e Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 10 Jan 2024 15:48:10 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=88=BF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 8 + common/src/main/assets/chat_message_bg.png | Bin 0 -> 712 bytes .../common/activity/SudGameActivity.java | 215 ++++++++- .../common/adapter/SudGameChatAdapter.java | 122 +++++ .../adapter/SudGameUserListAdapter.java | 61 +++ .../common/bean/SudGameChatImModel.java | 26 ++ .../yunbao/common/bean/SudGameUserModel.java | 14 + .../dialog/SudGameInputPopupWindow.java | 73 +++ .../common/event/SudGameSocketImEvent.java | 120 +++++ .../manager/imrongcloud/GameMicManager.java | 429 ++++++++++++++++++ .../common/sud/QuickStartGameViewModel.java | 4 + .../sud/audio/AudioEngineUpdateType.java | 6 + .../yunbao/common/sud/audio/AudioPCMData.java | 8 + .../common/sud/audio/AudioRoomState.java | 34 ++ .../yunbao/common/sud/audio/AudioStream.java | 7 + .../common/sud/audio/ISudAudioEngine.java | 121 +++++ .../sud/audio/ISudAudioEventListener.java | 95 ++++ .../common/sud/audio/MediaViewMode.java | 7 + .../common/sud/model/AudioJoinRoomModel.java | 16 + .../common/utils/LoadDian9TuUtilSud.java | 108 +++++ .../yunbao/common}/utils/NinePatchChunk.java | 2 +- .../common/views/SudGameChatViewHolder.java | 49 ++ .../views/SudGameUserListViewHolder.java | 12 + .../com/yunbao/common/views}/TopGradual.java | 2 +- .../drawable/background_sud_game_input.xml | 5 + .../background_sud_game_input_edit_text.xml | 5 + .../drawable/bg_live_sud_game_back_new.png | Bin 0 -> 2678 bytes .../bg_live_sud_game_bottom_input.xml | 5 + .../bg_live_sud_game_bottom_input_right.xml | 7 + .../res/drawable/bg_live_sud_game_top_new.xml | 5 + .../src/main/res/layout/activity_sud_game.xml | 252 +++++----- .../main/res/layout/dialog_sud_game_input.xml | 29 ++ .../layout/view_sud_game_chat_item_holder.xml | 24 + .../layout/view_sud_game_user_list_holder.xml | 21 + .../mipmap-xxhdpi/icon_game_close_wheat.png | Bin 0 -> 6267 bytes .../res/mipmap-xxhdpi/icon_game_hang_up.png | Bin 0 -> 6173 bytes .../mipmap-xxhdpi/icon_game_open_wheat.png | Bin 0 -> 5400 bytes .../main/res/mipmap-xxhdpi/icon_game_seat.png | Bin 0 -> 5927 bytes .../main/res/mipmap-xxhdpi/icon_send_game.png | Bin 0 -> 13814 bytes .../icon_sud_history_live_new.png | Bin 0 -> 6035 bytes .../mipmap-xxhdpi/icon_vacancy_sud_game.png | Bin 0 -> 3409 bytes common/src/main/res/values/strings.xml | 1 + .../dialog/LiveGiveHotDialogFragment.java | 4 +- .../yunbao/live/utils/LoadDian9TuUtil.java | 1 + .../yunbao/live/views/LiveRoomViewHolder.java | 2 +- .../live/views/SystemMessageViewHolder.java | 2 +- 46 files changed, 1769 insertions(+), 133 deletions(-) create mode 100644 common/src/main/assets/chat_message_bg.png create mode 100644 common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java create mode 100644 common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java create mode 100644 common/src/main/java/com/yunbao/common/event/SudGameSocketImEvent.java create mode 100644 common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/AudioEngineUpdateType.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/AudioPCMData.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/AudioRoomState.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/AudioStream.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEngine.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEventListener.java create mode 100644 common/src/main/java/com/yunbao/common/sud/audio/MediaViewMode.java create mode 100644 common/src/main/java/com/yunbao/common/sud/model/AudioJoinRoomModel.java create mode 100644 common/src/main/java/com/yunbao/common/utils/LoadDian9TuUtilSud.java rename {live/src/main/java/com/yunbao/live => common/src/main/java/com/yunbao/common}/utils/NinePatchChunk.java (98%) create mode 100644 common/src/main/java/com/yunbao/common/views/SudGameChatViewHolder.java create mode 100644 common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java rename {live/src/main/java/com/yunbao/live/custom => common/src/main/java/com/yunbao/common/views}/TopGradual.java (97%) create mode 100644 common/src/main/res/drawable/background_sud_game_input.xml create mode 100644 common/src/main/res/drawable/background_sud_game_input_edit_text.xml create mode 100644 common/src/main/res/drawable/bg_live_sud_game_back_new.png create mode 100644 common/src/main/res/drawable/bg_live_sud_game_bottom_input.xml create mode 100644 common/src/main/res/drawable/bg_live_sud_game_bottom_input_right.xml create mode 100644 common/src/main/res/drawable/bg_live_sud_game_top_new.xml create mode 100644 common/src/main/res/layout/dialog_sud_game_input.xml create mode 100644 common/src/main/res/layout/view_sud_game_chat_item_holder.xml create mode 100644 common/src/main/res/layout/view_sud_game_user_list_holder.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_game_hang_up.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_game_open_wheat.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_game_seat.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_send_game.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_sud_history_live_new.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_vacancy_sud_game.png diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 499fa2607..8d2e7884e 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -23,6 +23,7 @@ import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.Utils; import com.facebook.appevents.AppEventsLogger; import com.fm.openinstall.OpenInstall; +import com.google.gson.Gson; import com.shayu.phonelive.utils.LogUtils; import com.tencent.imsdk.v2.V2TIMGroupMemberInfo; import com.tencent.imsdk.v2.V2TIMManager; @@ -36,12 +37,14 @@ import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.bean.AnchorStartLiveBean; import com.yunbao.common.bean.CrashSaveBean; +import com.yunbao.common.event.SudGameSocketImEvent; import com.yunbao.common.manager.imrongcloud.InstructorSendReward; import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider; import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.AppManager; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.GoogleUtils; import com.yunbao.common.utils.L; import com.yunbao.common.utils.SpUtil; @@ -210,6 +213,11 @@ public class AppContext extends CommonAppContext { SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class); JSONObject map = received.getMsg().getJSONObject(0); sendStartAnchorLive(map); + } else if (message.getTargetId().contains("v")) { + String contentJson = ((TextMessage) message.getContent()).getContent(); + Log.e("wewe", contentJson); + SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class); + Bus.get().post(sudGameSocketImEvent); } //主播页面 if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) { diff --git a/common/src/main/assets/chat_message_bg.png b/common/src/main/assets/chat_message_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..4138e7e12289f519d646c632d70c9a0342b19291 GIT binary patch literal 712 zcmeAS@N?(olHy`uVBq!ia0vp^SAf`ugAGWEzMg3Yq(brvLXsJnm^guK7*GH*K$r)L zffPd~5N89iDiEs!F(Wee0dkP}AokM2j-w0=O!}TKjv*Dd-rjZ07D<;m@Nj--wZR3E zz}2j*x)Cqc1rEMn-|m#(8s)+NY(WO!Hk0n&j&`4Sn@>wim(P2?SY^5T+ST?~ORB8*mZ>&bt&j`jXE|d2ru1ui>92a$ zt*h$R$^F#3q3C{f^{dO*d0s83GK;--a9w1${?=NC8sTDmLwn2y1!y|3=hY5s1uTG;IG%Rukgbg9l~teHw{1w_U-eqKX;=2N3#)z=x&&-LBlK*mf%=N~X9ZXN%5w>r zXMJ#Iv!LToR?9OviRXI~WE>k8I0PtYfUtlF2y<|;u!3+C69@yP8Nf;!z{+4sBt);w zG(5OR>>0~eGxrs*N?Zcu&j2k*cL`8`#u2(#Uhqov_rQRwvjrXJh8|Blc}O;Vz8gzu zY05mEJMzVRv!t)=`gPhTa>e4bcV+pX626BTZ{tlo{wMmc-S-E7dHw!W?$X?Sy{BHE z-}=FpD$D2hGG{NCoUFR{hFYn#4H0Qs2Bc^Y#M0uvL#={xv^4 zU$!XZZ`j}MXJ@bH{lT0U;=k(mKJI;i;^(8%-#?2@3lLxDKfQ7L>cg5Q(_3P$He9=U nfA0S|FV3n-^Fw0y!`52H&4oU%A}!~w28npO`njxgN@xNA8yp~d literal 0 HcmV?d00001 diff --git a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java index 93544495f..f059a0103 100644 --- a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java @@ -3,29 +3,40 @@ package com.yunbao.common.activity; import android.app.Activity; import android.view.View; import android.widget.FrameLayout; +import android.widget.ImageView; import android.widget.TextView; import androidx.lifecycle.Observer; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.google.gson.Gson; import com.lxj.xpopup.XPopup; -import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.R; +import com.yunbao.common.adapter.SudGameChatAdapter; +import com.yunbao.common.adapter.SudGameUserListAdapter; import com.yunbao.common.bean.CheckRemainingBalance; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.CustomSidebarChildModel; import com.yunbao.common.bean.CustomSidebarInfoModel; +import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.dialog.SudGameInputPopupWindow; import com.yunbao.common.event.CheckRemainingBalanceEvent; +import com.yunbao.common.event.SudGameSocketImEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.imrongcloud.GameMicManager; import com.yunbao.common.sud.QuickStartGameViewModel; import com.yunbao.common.sud.model.GameConfigModel; +import com.yunbao.common.sud.model.GameViewInfoModel; import com.yunbao.common.sud.state.SudMGPMGState; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.LiveSudGameHistoryPopup; +import com.yunbao.common.views.TopGradual; import com.yunbao.common.views.weight.ViewClicksAntiShake; import org.greenrobot.eventbus.Subscribe; @@ -35,15 +46,28 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -public class SudGameActivity extends AbsActivity { +import cn.rongcloud.rtc.api.RCRTCEngine; +import cn.rongcloud.rtc.api.RCRTCRemoteUser; +import cn.rongcloud.rtc.api.RCRTCRoom; +import cn.rongcloud.rtc.api.stream.RCRTCInputStream; +import cn.rongcloud.rtc.base.RTCErrorCode; + +public class SudGameActivity extends AbsActivity implements GameMicManager.MeetingCallback { private FrameLayout gameContainer; private long mInteractionID; private String mLiveUid; private final QuickStartGameViewModel gameViewModel = new QuickStartGameViewModel(); // 创建ViewModel private CreateSudRoomModel mCreateSudRoomModel; - private TextView gameTitle, roomName, roomNumber; - private RoundedImageView mAvatar; + private TextView roomName, roomNumber; + private GameMicManager gameMicManager; + private ImageView gameCloseWheat, gameSeat; + private boolean disable = true, publishDefault = false; + + private RecyclerView chatList, userList; + private SudGameChatAdapter mLiveChatAdapter; + private SudGameUserListAdapter sudGameUserListAdapter; + @Override protected int getLayoutId() { return R.layout.activity_sud_game; @@ -56,7 +80,9 @@ public class SudGameActivity extends AbsActivity { initView(); initDate(); } + private List customSidebarChildModels = new ArrayList<>(); + private void initDate() { LiveNetManager.get(mContext) .getCustomSidebarInfo("1", new HttpCallback>() { @@ -75,10 +101,21 @@ public class SudGameActivity extends AbsActivity { } }); + gameMicManager = new GameMicManager(); + gameMicManager.attachView(this); + gameMicManager.config(this); + gameMicManager.joinRoom(mLiveUid); + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + gameCloseWheat.setVisibility(View.INVISIBLE); } + @Override protected void onDestroy() { Bus.getOff(this); + gameMicManager.leaveRoom(); + gameMicManager.detachView(); super.onDestroy(); } @@ -89,15 +126,33 @@ public class SudGameActivity extends AbsActivity { mLiveUid = mCreateSudRoomModel.getSudGameRoomId(); gameContainer = findViewById(R.id.game_container); - gameTitle = findViewById(R.id.game_title); roomName = findViewById(R.id.room_name); roomNumber = findViewById(R.id.room_number); - mAvatar = findViewById(R.id.avatar); + gameCloseWheat = findViewById(R.id.game_close_wheat); + gameSeat = findViewById(R.id.game_seat); + chatList = findViewById(R.id.chat_list); + userList = findViewById(R.id.user_list); + //聊天栏 + FrameLayout.LayoutParams params1 = (FrameLayout.LayoutParams) + chatList.getLayoutParams(); + params1.topMargin = DpUtil.dp2px(65); + chatList.setLayoutParams(params1); + + chatList.setHasFixedSize(true); + LinearLayoutManager layoutManager = new LinearLayoutManager(mContext); + layoutManager.setOrientation(RecyclerView.VERTICAL); + layoutManager.setStackFromEnd(true); + chatList.setLayoutManager(layoutManager); + chatList.addItemDecoration(new TopGradual()); + chatList.setItemViewCacheSize(10); + mLiveChatAdapter = new SudGameChatAdapter(mContext); + chatList.setAdapter(mLiveChatAdapter); + sudGameUserListAdapter = new SudGameUserListAdapter(new ArrayList<>()); + userList.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false)); + userList.setAdapter(sudGameUserListAdapter); if (mCreateSudRoomModel != null) { - gameTitle.setText(mCreateSudRoomModel.getSudGameName()); roomName.setText(mCreateSudRoomModel.getRoomName()); roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId()); - ImgLoader.display(mContext, mCreateSudRoomModel.getAvatar(), mAvatar); } ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -115,6 +170,52 @@ public class SudGameActivity extends AbsActivity { .asCustom(new LiveSudGameHistoryPopup(mContext, customSidebarChildModels)).show(); } }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_seat), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (publishDefault) { + disable = true; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + gameMicManager.unPublishStreams(); + } else { + gameMicManager.publishDefaultAVStream(); + } + + } + }); + ViewClicksAntiShake.clicksAntiShake(gameCloseWheat, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (disable) { + disable = false; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat); + } else { + disable = true; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + } + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_review_input), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + new XPopup.Builder(mContext) + .enableDrag(false) + .asCustom(new SudGameInputPopupWindow(mContext, new SudGameInputPopupWindow.SudGameInputCallBack() { + @Override + public void sendMessage(String textMessage) { + gameMicManager.sendMessage(textMessage); + } + })) + .show(); + } + }); + gameViewModel.gameViewLiveData.observe(this, new Observer() { @Override public void onChanged(View view) { @@ -122,7 +223,9 @@ public class SudGameActivity extends AbsActivity { gameContainer.removeAllViews(); } else { // 把游戏View添加到容器内 gameContainer.addView(view, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT); + } + } }); // 加载游戏,参数定义可查看BaseGameViewModel.switchGame()方法注释 @@ -137,6 +240,7 @@ public class SudGameActivity extends AbsActivity { gameConfigModel.ui.game_settle_again_btn.custom = true; gameConfigModel.ui.start_btn.custom = true; + // SudMGP平台64bit游戏ID gameViewModel.switchGame((Activity) mContext, mLiveUid, mInteractionID); // gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, -1, true, 1); @@ -147,6 +251,13 @@ public class SudGameActivity extends AbsActivity { // // } // }); + // 设置游戏安全操作区域 + GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel(); + gameViewRectModel.left = 0; + gameViewRectModel.top = DpUtil.dp2px(155); + gameViewRectModel.right = 0; + gameViewRectModel.bottom = DpUtil.dp2px(155); + gameViewModel.gameViewRectModel = gameViewRectModel; } @@ -156,6 +267,7 @@ public class SudGameActivity extends AbsActivity { switch (event.getSudMGPMGState()) { case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN: case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN: + LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback() { @Override public void onSuccess(CheckRemainingBalance data) { @@ -190,9 +302,9 @@ public class SudGameActivity extends AbsActivity { HttpCallback() { @Override public void onSuccess(CheckRemainingBalance data) { - if (data.getStatus()==1){ + if (data.getStatus() == 1) { gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true); - }else { + } else { } @@ -205,10 +317,91 @@ public class SudGameActivity extends AbsActivity { }); break; case SudMGPMGState.MG_COMMON_GAME_STATE: - LiveNetManager.get(mContext).deductMoney( mCreateSudRoomModel.getSudGameRoomId()); + LiveNetManager.get(mContext).deductMoney(mCreateSudRoomModel.getSudGameRoomId()); break; } } + @Override + public void onJoinRoomSuccess(RCRTCRoom rcrtcRoom) { + + // 主动订阅远端用户发布的资源 + gameMicManager.subscribeAVStream(); + } + + @Override + public void onJoinRoomFailed(RTCErrorCode rtcErrorCode) { + ToastUtil.show("加入失败 "); + } + + @Override + public void onPublishSuccess() { + runOnUiThread(new Runnable() { + @Override + public void run() { + ImgLoader.display(mContext, R.mipmap.icon_game_hang_up, gameSeat); + publishDefault = true; + gameCloseWheat.setVisibility(View.VISIBLE); + disable = false; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat); + } + }); + + } + + @Override + public void onPublishFailed() { + ToastUtil.show("发布失败 "); + } + + @Override + public void onSubscribeSuccess(List inputStreamList) { + ToastUtil.show("订阅成功 "); + } + + @Override + public void onSubscribeFailed() { + ToastUtil.show("订阅失败 "); + } + + @Override + public void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser) { + + } + + @Override + public void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser) { + + } + + @Override + public void insertItem(SudGameChatImModel sudGameChatImModel) { + mLiveChatAdapter.insertItem(sudGameChatImModel); + } + + @Override + public void onUnPublishStreamsSuccess() { + runOnUiThread(new Runnable() { + @Override + public void run() { + ImgLoader.display(mContext, R.mipmap.icon_game_seat, gameSeat); + publishDefault = false; + gameCloseWheat.setVisibility(View.INVISIBLE); + } + }); + + } + + @Override + public void onUnPublishStreamsFailed() { + + } + + @Subscribe(threadMode = ThreadMode.MAIN) + public void onSudGameSocketImEvent(SudGameSocketImEvent event) { + gameMicManager.processingMessage(event); + } } diff --git a/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java b/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java new file mode 100644 index 000000000..0cc916894 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java @@ -0,0 +1,122 @@ +package com.yunbao.common.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.views.SudGameChatViewHolder; + +import java.util.ArrayList; +import java.util.List; + +public class SudGameChatAdapter extends RecyclerView.Adapter { + private boolean isBottom = false; + List sudGameChatImModels = new ArrayList<>(); + private RecyclerView mRecyclerView; + private LinearLayoutManager mLayoutManager; + private int mRecyclerViewScrolledDy; + private Context mContext; + + public SudGameChatAdapter(Context mContext) { + this.mContext = mContext; + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_chat_item_holder, parent, false); + return new SudGameChatViewHolder(herdView); + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + if (holder instanceof SudGameChatViewHolder) { + SudGameChatViewHolder itemViewHolder = (SudGameChatViewHolder) holder; + itemViewHolder.sudGameChat(sudGameChatImModels.get(position)); + + } + } + + @Override + public int getItemCount() { + return sudGameChatImModels.size(); + } + + @Override + public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) { + mRecyclerView = recyclerView; + mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager(); + mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { + @Override + public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { + super.onScrolled(recyclerView, dx, dy); + if (isBottom && dy >= 0) return; + mRecyclerViewScrolledDy = dy; + isBottom = false; + + } + + @Override + public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { + super.onScrollStateChanged(recyclerView, newState); + if (newState == 0 && isSlideToBottom(recyclerView)) { + mRecyclerViewScrolledDy = 0; + scrollToBottom(); + isBottom = true; + } else if (newState == 0) { + isBottom = false; + } + } + }); + } + + public synchronized void insertItem(SudGameChatImModel bean) { + if (bean == null) { + return; + } + int size = sudGameChatImModels.size(); + //设置最大展示99条消息 + if (size >= 100 && (isBottom || mRecyclerViewScrolledDy == 0)) { + + sudGameChatImModels.subList(0, 50).clear(); + notifyItemRangeRemoved(0, 50); + } + sudGameChatImModels.add(bean); + if (getItemCount() == 1) { + notifyDataSetChanged(); + } else { + notifyItemInserted(getItemCount()); + } + if (isBottom || mRecyclerViewScrolledDy == 0) { + scrollToBottom(); + } + } + + /** + * 判断是否滚到底部 + * + * @param recyclerView + * @return + */ + public boolean isSlideToBottom(RecyclerView recyclerView) { + if (recyclerView == null) return false; + if (recyclerView.computeVerticalScrollExtent() + recyclerView.computeVerticalScrollOffset() >= recyclerView.computeVerticalScrollRange()) + return true; + return false; + } + + public void scrollToBottom() { + if (sudGameChatImModels.size() > 0) { + mRecyclerView.smoothScrollToPosition(getItemCount()); + } + mRecyclerViewScrolledDy = 0; + } + +} diff --git a/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java new file mode 100644 index 000000000..3c7afd853 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java @@ -0,0 +1,61 @@ +package com.yunbao.common.adapter; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.SudGameUserModel; +import com.yunbao.common.views.SudGameChatViewHolder; +import com.yunbao.common.views.SudGameUserListViewHolder; + +import java.util.ArrayList; +import java.util.List; + +public class SudGameUserListAdapter extends RecyclerView.Adapter { + private List gameUserModels = new ArrayList<>(); + + public SudGameUserListAdapter(List gameUserModels) { + + if (gameUserModels.size() < 7) { + this.gameUserModels.addAll(gameUserModels); + for (int i = 0; i < this.gameUserModels.size(); i++) { + this.gameUserModels.get(i).setNullUser(false); + } + int size = 7 - gameUserModels.size(); + for (int i = 0; i < size; i++) { + this.gameUserModels.add(new SudGameUserModel().setNullUser(true)); + } + } else if (gameUserModels.size() == 7) { + this.gameUserModels.addAll(gameUserModels); + for (int i = 0; i < this.gameUserModels.size(); i++) { + this.gameUserModels.get(i).setNullUser(false); + } + } else { + for (int i = 0; i < 7; i++) { + this.gameUserModels.add(gameUserModels.get(i).setNullUser(false)); + } + } + + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_user_list_holder, parent, false); + return new SudGameUserListViewHolder(herdView); + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + + } + + @Override + public int getItemCount() { + return gameUserModels.size(); + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java new file mode 100644 index 000000000..e55ee691d --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java @@ -0,0 +1,26 @@ +package com.yunbao.common.bean; + +public class SudGameChatImModel extends BaseModel { + //昵称 + private String nickname; + //文字消息 + private String textMessage; + + public String getNickname() { + return nickname; + } + + public SudGameChatImModel setNickname(String nickname) { + this.nickname = nickname; + return this; + } + + public String getTextMessage() { + return textMessage; + } + + public SudGameChatImModel setTextMessage(String textMessage) { + this.textMessage = textMessage; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java new file mode 100644 index 000000000..e7b45af68 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java @@ -0,0 +1,14 @@ +package com.yunbao.common.bean; + +public class SudGameUserModel extends BaseModel { + private boolean nullUser; + + public boolean isNullUser() { + return nullUser; + } + + public SudGameUserModel setNullUser(boolean nullUser) { + this.nullUser = nullUser; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java new file mode 100644 index 000000000..6cac0cc25 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java @@ -0,0 +1,73 @@ +package com.yunbao.common.dialog; + +import android.content.Context; +import android.text.TextUtils; +import android.widget.EditText; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.core.BottomPopupView; +import com.yunbao.common.R; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +/*** + * 游戏房字体输入 + */ +public class SudGameInputPopupWindow extends BottomPopupView { + private EditText textMessage; + private SudGameInputCallBack sudGameInputCallBack; + + public SudGameInputPopupWindow(@NonNull Context context, SudGameInputCallBack sudGameInputCallBack) { + super(context); + this.sudGameInputCallBack = sudGameInputCallBack; + } + + // 返回自定义弹窗的布局 + @Override + protected int getImplLayoutId() { + return R.layout.dialog_sud_game_input; + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + @Override + protected void onCreate() { + super.onCreate(); + initView(); + initDate(); + + } + + private void initView() { + textMessage = findViewById(R.id.text_message); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.send), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dialog.dismiss(); + if (sudGameInputCallBack != null) { + String textMessageStr = textMessage.getText().toString(); + if (!TextUtils.isEmpty(textMessageStr)) { + if (textMessageStr.length() > 100) { + ToastUtil.show(WordUtil.isNewZh() ? "超出字數限制" : "Exceed word limit"); + } else { + sudGameInputCallBack.sendMessage(textMessageStr); + } + } else { + ToastUtil.show(WordUtil.getNewString(R.string.cannot_be_empty)); + } + + } + } + }); + + } + + private void initDate() { + + } + + public interface SudGameInputCallBack { + void sendMessage(String textMessage); + } +} diff --git a/common/src/main/java/com/yunbao/common/event/SudGameSocketImEvent.java b/common/src/main/java/com/yunbao/common/event/SudGameSocketImEvent.java new file mode 100644 index 000000000..31d9ec28e --- /dev/null +++ b/common/src/main/java/com/yunbao/common/event/SudGameSocketImEvent.java @@ -0,0 +1,120 @@ +package com.yunbao.common.event; + +import com.google.gson.annotations.SerializedName; +import com.yunbao.common.bean.BaseModel; + +import java.util.List; + +public class SudGameSocketImEvent extends BaseModel { + + @SerializedName("msg") + private List msg; + @SerializedName("retcode") + private String retcode; + @SerializedName("retmsg") + private String retmsg; + + public List getMsg() { + return msg; + } + + public void setMsg(List msg) { + this.msg = msg; + } + + public String getRetcode() { + return retcode; + } + + public void setRetcode(String retcode) { + this.retcode = retcode; + } + + public String getRetmsg() { + return retmsg; + } + + public void setRetmsg(String retmsg) { + this.retmsg = retmsg; + } + + public static class MsgDTO { + @SerializedName("action") + private String action; + @SerializedName("uid") + private String uid; + @SerializedName("roomnum") + private String roomnum; + @SerializedName("ct") + private String ct; + @SerializedName("uname") + private String uname; + @SerializedName("_method_") + private String method; + @SerializedName("equipment") + private String equipment; + + public String getAction() { + return action; + } + + public MsgDTO setAction(String action) { + this.action = action; + return this; + } + + public String getUid() { + return uid; + } + + public MsgDTO setUid(String uid) { + this.uid = uid; + return this; + } + + public String getRoomnum() { + return roomnum; + } + + public MsgDTO setRoomnum(String roomnum) { + this.roomnum = roomnum; + return this; + } + + public String getCt() { + return ct; + } + + public MsgDTO setCt(String ct) { + this.ct = ct; + return this; + } + + public String getUname() { + return uname; + } + + public MsgDTO setUname(String uname) { + this.uname = uname; + return this; + } + + public String getMethod() { + return method; + } + + public MsgDTO setMethod(String method) { + this.method = method; + return this; + } + + public String getEquipment() { + return equipment; + } + + public MsgDTO setEquipment(String equipment) { + this.equipment = equipment; + return this; + } + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java new file mode 100644 index 000000000..abd8b6d7f --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java @@ -0,0 +1,429 @@ +package com.yunbao.common.manager.imrongcloud; + +import android.content.Context; +import android.text.TextUtils; +import android.util.Log; + +import com.google.gson.Gson; +import com.yunbao.common.CommonAppContext; +import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.event.SudGameSocketImEvent; +import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; + +import java.util.ArrayList; +import java.util.List; + +import cn.rongcloud.rtc.api.RCRTCEngine; +import cn.rongcloud.rtc.api.RCRTCRemoteUser; +import cn.rongcloud.rtc.api.RCRTCRoom; +import cn.rongcloud.rtc.api.RCRTCRoomConfig; +import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback; +import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback; +import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener; +import cn.rongcloud.rtc.api.stream.RCRTCInputStream; +import cn.rongcloud.rtc.base.RCRTCRoomType; +import cn.rongcloud.rtc.base.RTCErrorCode; +import io.rong.imlib.IRongCallback; +import io.rong.imlib.IRongCoreCallback; +import io.rong.imlib.IRongCoreEnum; +import io.rong.imlib.RongIMClient; +import io.rong.imlib.chatroom.base.RongChatRoomClient; +import io.rong.imlib.model.Conversation; +import io.rong.imlib.model.Message; +import io.rong.message.TextMessage; + +public class GameMicManager { + MeetingCallback mMeetingCallback = null; + private RCRTCRoom mRtcRoom = null; + private String mRoomID = ""; + + + private final IRCRTCRoomEventsListener roomEventsListener = new IRCRTCRoomEventsListener() { + /** + * 房间内用户发布资源 + * + * @param rcrtcRemoteUser 远端用户 + * @param list 发布的资源 + */ + @Override + public void onRemoteUserPublishResource(RCRTCRemoteUser rcrtcRemoteUser, final List list) { + subscribeAVStream(); + } + + @Override + public void onRemoteUserMuteAudio(RCRTCRemoteUser rcrtcRemoteUser, RCRTCInputStream rcrtcInputStream, boolean b) { + + } + + @Override + public void onRemoteUserMuteVideo(RCRTCRemoteUser rcrtcRemoteUser, RCRTCInputStream rcrtcInputStream, boolean b) { + } + + + @Override + public void onRemoteUserUnpublishResource(RCRTCRemoteUser rcrtcRemoteUser, List list) { + } + + /** + * 用户加入房间 + * + * @param rcrtcRemoteUser 远端用户 + */ + @Override + public void onUserJoined(final RCRTCRemoteUser rcrtcRemoteUser) { + try { + getView().onUserJoined(rcrtcRemoteUser); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + /** + * 用户离开房间 + * + * @param rcrtcRemoteUser 远端用户 + */ + @Override + public void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser) { + try { + getView().onUserLeft(rcrtcRemoteUser); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onUserOffline(RCRTCRemoteUser rcrtcRemoteUser) { + } + + @Override + public void onPublishLiveStreams(List list) { + } + + @Override + public void onUnpublishLiveStreams(List list) { + } + + /** + * 自己退出房间。 例如断网退出等 + * @param i 状态码 + */ + @Override + public void onLeaveRoom(int i) { + } + }; + + protected MeetingCallback getView() { + if (mMeetingCallback == null) { + throw new IllegalStateException("view is not attached"); + } else { + return mMeetingCallback; + } + } + + public void attachView(MeetingCallback callback) { + mMeetingCallback = callback; + } + + public void detachView() { + mMeetingCallback = null; + } + + /** + * 主动订阅远端用户发布的流 + * 视频流需要用户设置用于显示载体的videoview + */ + public void subscribeAVStream() { + if (mRtcRoom == null || mRtcRoom.getRemoteUsers() == null) { + return; + } + final List inputStreams = new ArrayList<>(); + for (final RCRTCRemoteUser remoteUser : mRtcRoom.getRemoteUsers()) { + if (remoteUser.getStreams().size() == 0) { + continue; + } + + inputStreams.addAll(remoteUser.getStreams()); + } + + if (inputStreams.size() == 0) { + return; + } + mRtcRoom.getLocalUser().subscribeStreams(inputStreams, new IRCRTCResultCallback() { + @Override + public void onSuccess() { + + + try { + getView().onSubscribeSuccess(inputStreams); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode errorCode) { + try { + getView().onSubscribeFailed(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + } + + public void unPublishStreams() { + if (mRtcRoom == null) { + return; + } + mRtcRoom.getLocalUser().unpublishStream(RCRTCEngine.getInstance().getDefaultAudioStream(), new IRCRTCResultCallback() { + @Override + public void onSuccess() { + try { + getView().onUnPublishStreamsSuccess(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode errorCode) { + try { + getView().onUnPublishStreamsFailed(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + } + + /** + * 发布默认流 + */ + public void publishDefaultAVStream() { + if (mRtcRoom == null) { + return; + } + mRtcRoom.getLocalUser().publishStream(RCRTCEngine.getInstance().getDefaultAudioStream(), new IRCRTCResultCallback() { + @Override + public void onSuccess() { + try { + getView().onPublishSuccess(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode rtcErrorCode) { + try { + getView().onPublishFailed(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + } + + + /** + * 配置rtc sdk + */ + public void config(Context context) { + +// RCRTCConfig.Builder configBuilder = RCRTCConfig.Builder.create(); +// // 是否硬解码 +// configBuilder.enableHardwareDecoder(true); +// // 是否硬编码 +// configBuilder.enableHardwareEncoder(true); +// +// // init 需结合 uninit 使用,否则有些配置无法重新初始化 +// RCRTCEngine.getInstance().unInit(); +// RCRTCEngine.getInstance().init(context, configBuilder.build()); + +// RCRTCVideoStreamConfig.Builder videoConfigBuilder = RCRTCVideoStreamConfig.Builder.create(); +// // 设置分辨率 +// videoConfigBuilder.setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_720_1280); +// // 设置帧率 +// videoConfigBuilder.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_30); +// /** +// * 设置最小码率,可根据分辨率RCRTCVideoResolution设置 +// * {@link RCRTCParamsType.RCRTCVideoResolution)} +// */ +// videoConfigBuilder.setMinRate(250); +// /** +// * 设置最大码率,可根据分辨率RCRTCVideoResolution设置 +// * {@link RCRTCParamsType.RCRTCVideoResolution)} +// */ +// videoConfigBuilder.setMaxRate(2200); +// RCRTCEngine.getInstance().getDefaultVideoStream().setVideoConfig(videoConfigBuilder.build()); + //打开扬声器。 + RCRTCEngine.getInstance().enableSpeaker(true); + // 启用耳返功能 +// RCRTCEngine.getInstance().getDefaultAudioStream().enableEarMonitoring(true); + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(false); + } + + public void joinRoom(String roomId) { + mRoomID = roomId; + RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create() + // 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO + .setRoomType(RCRTCRoomType.MEETING) + .build(); + RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback() { + @Override + public void onSuccess(final RCRTCRoom rcrtcRoom) { + GameMicManager.this.mRtcRoom = rcrtcRoom; + // 注册房间回调 + rcrtcRoom.registerRoomListener(roomEventsListener); + try { + getView().onJoinRoomSuccess(rcrtcRoom); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode rtcErrorCode) { + try { + getView().onJoinRoomFailed(rtcErrorCode); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + RongChatRoomClient.getInstance().joinChatRoom("v" + roomId, -1, new IRongCoreCallback.OperationCallback() { + @Override + public void onSuccess() { + Log.i("tx", "加入成功"); + + } + + @Override + public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) { + Log.i("tx", "加入" + "失败" + coreErrorCode); + if (WordUtil.isNewZh()) { + ToastUtil.show("網絡不佳無法連接,請重新進入"); + } else { + ToastUtil.show("The network is not connected, please re-enter"); + } + } + }); + } + + public void leaveRoom() { + RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() { + @Override + public void onFailed(RTCErrorCode rtcErrorCode) { + } + + @Override + public void onSuccess() { + } + }); + RongChatRoomClient.getInstance().quitChatRoom("v" + mRoomID, new IRongCoreCallback.OperationCallback() { + @Override + public void onSuccess() { + Log.i("tx", "退出成功"); + } + + @Override + public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) { + Log.i("tx", "退出" + "" + coreErrorCode); + } + }); + } + + /** + * 处理游戏房Im消息 + */ + public void processingMessage(SudGameSocketImEvent socketImModel) { + + List msgDTOS = socketImModel.getMsg(); + if (msgDTOS.isEmpty()) return; + SudGameSocketImEvent.MsgDTO msgDTO = msgDTOS.get(0); + //正常文字消息 + if (TextUtils.equals(msgDTO.getMethod(), "SendMsg")) { + getView().insertItem(new SudGameChatImModel().setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt())); + } + } + + /** + * 发送聊天信息 + * + * @param textMessage + */ + public void sendMessage(String textMessage) { + IMLoginModel loginModel = IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getUserInfo(); + SudGameSocketImEvent sudGameSocketImEvent = new SudGameSocketImEvent(); + sudGameSocketImEvent.setRetcode("000000"); + sudGameSocketImEvent.setRetmsg("ok"); + + SudGameSocketImEvent.MsgDTO msgDTO = new SudGameSocketImEvent.MsgDTO(); + msgDTO.setAction("0") + .setCt(textMessage) + .setEquipment("app") + .setUid(String.valueOf(loginModel.getId())) + .setMethod("SendMsg") + .setUname(loginModel.getUserNicename()) + .setRoomnum(mRoomID); + + List msgDTOS = new ArrayList<>(); + msgDTOS.add(msgDTO); + sudGameSocketImEvent.setMsg(msgDTOS); + Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM; + TextMessage messageContent = TextMessage.obtain(new Gson().toJson(sudGameSocketImEvent)); + Message message = Message.obtain("v" + mRoomID, conversationType, messageContent); + RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() { + @Override + public void onAttached(Message message) { + + } + + @Override + public void onSuccess(Message message) { + Log.i("tx", "发送成功"); + String contentJson = ((TextMessage) message.getContent()).getContent(); + Log.e("wewe", contentJson); + SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class); + processingMessage(sudGameSocketImEvent); + } + + @Override + public void onError(Message message, RongIMClient.ErrorCode errorCode) { + + } + }); + } + + /** + * activity相关回调 + */ + public interface MeetingCallback { + void onJoinRoomSuccess(RCRTCRoom rcrtcRoom); + + void onJoinRoomFailed(RTCErrorCode rtcErrorCode); + + void onPublishSuccess(); + + + void onPublishFailed(); + + void onUnPublishStreamsSuccess(); + + void onUnPublishStreamsFailed(); + + void onSubscribeSuccess(List inputStreamList); + + void onSubscribeFailed(); + + void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser); + + void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser); + + void insertItem(SudGameChatImModel sudGameChatImModel); + } +} diff --git a/common/src/main/java/com/yunbao/common/sud/QuickStartGameViewModel.java b/common/src/main/java/com/yunbao/common/sud/QuickStartGameViewModel.java index d0dd12dc1..4a98859bd 100644 --- a/common/src/main/java/com/yunbao/common/sud/QuickStartGameViewModel.java +++ b/common/src/main/java/com/yunbao/common/sud/QuickStartGameViewModel.java @@ -52,6 +52,10 @@ public class QuickStartGameViewModel extends BaseGameViewModel { */ public GameViewInfoModel.GameViewRectModel gameViewRectModel; + public GameViewInfoModel.GameViewRectModel getGameViewRectModel() { + return gameViewRectModel; + } + /** * 游戏的语言代码 */ diff --git a/common/src/main/java/com/yunbao/common/sud/audio/AudioEngineUpdateType.java b/common/src/main/java/com/yunbao/common/sud/audio/AudioEngineUpdateType.java new file mode 100644 index 000000000..11b5f8fda --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/AudioEngineUpdateType.java @@ -0,0 +1,6 @@ +package com.yunbao.common.sud.audio; + +public enum AudioEngineUpdateType { + ADD, + DELETE +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/AudioPCMData.java b/common/src/main/java/com/yunbao/common/sud/audio/AudioPCMData.java new file mode 100644 index 000000000..2873dceb4 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/AudioPCMData.java @@ -0,0 +1,8 @@ +package com.yunbao.common.sud.audio; + +import java.nio.ByteBuffer; + +public class AudioPCMData { + public ByteBuffer data; + public int dataLength; +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/AudioRoomState.java b/common/src/main/java/com/yunbao/common/sud/audio/AudioRoomState.java new file mode 100644 index 000000000..d6c0da466 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/AudioRoomState.java @@ -0,0 +1,34 @@ +package com.yunbao.common.sud.audio; + +/** + * 语聊房房间状态 + */ +public enum AudioRoomState { + DISCONNECTED(0), + CONNECTING(1), + CONNECTED(2); + + private int value; + + private AudioRoomState(int value) { + this.value = value; + } + + public int value() { + return this.value; + } + + public static AudioRoomState getZegoRoomState(int value) { + try { + if (DISCONNECTED.value == value) { + return DISCONNECTED; + } else if (CONNECTING.value == value) { + return CONNECTING; + } else { + return CONNECTED.value == value ? CONNECTED : null; + } + } catch (Exception var2) { + throw new RuntimeException("The enumeration cannot be found"); + } + } +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/AudioStream.java b/common/src/main/java/com/yunbao/common/sud/audio/AudioStream.java new file mode 100644 index 000000000..af265e8ee --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/AudioStream.java @@ -0,0 +1,7 @@ +package com.yunbao.common.sud.audio; + +public class AudioStream { + public String userID; + public String streamID; + public String extraInfo; +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEngine.java b/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEngine.java new file mode 100644 index 000000000..5653c8a57 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEngine.java @@ -0,0 +1,121 @@ +package com.yunbao.common.sud.audio; + +import android.view.View; + +import com.yunbao.common.sud.model.AudioJoinRoomModel; + +public interface ISudAudioEngine { + // region 1. 初始化、销毁SDK, 设置IAudioEventHandler回调 + + /** + * 设置事件处理器 + * + * @param listener 事件处理实例 + */ + void setEventListener(ISudAudioEventListener listener); + + + /** + * 销毁引擎SDK + */ + void destroy(); + // endregion + + // region 2. 登录房间、退出房间 + + /** + * 加入房间, 登录成功后, 默认不推流, 默认拉流 + * + * @param model roomId + */ + void joinRoom(AudioJoinRoomModel model); + + /** + * 离开房间 + */ + void leaveRoom(); + // endregion + + // region 3. 开启推流、停止推流 + + /** + * 开启推流 + */ + void startPublishStream(); + + /** + * 停止推流 + */ + void stopPublishStream(); + // endregion + + // region 4. 开启拉流、停止拉流 + + /** + * 开启拉流,进入房间,默认订阅拉流 + */ + void startSubscribingStream(); + + /** + * 停止拉流 + */ + void stopSubscribingStream(); + // endregion + + // region 5. 开始音频流监听、关闭音频流监听 + + /** + * 开始音频流监听 + */ + void startPCMCapture(); + + /** + * 关闭音频流监听 + */ + void stopPCMCapture(); + // endregion + + // region 6. 是否使用扬声器作为音频通道 + + /** + * 切换扬声器作为音频通道 + */ + void setAudioRouteToSpeaker(boolean enabled); + // endregion + + // region 7. 发送信令 + + /** + * 发送信令 + * + * @param command 信令内容 + * @param listener 回调 + */ + void sendCommand(String command, SendCommandListener listener); + + /** + * 发送指令回调接口 + */ + interface SendCommandListener { + void onResult(int value); + } + // endregion + + // region 8. 直播接口 + + /** + * 观众开始拉流 + * + * @param streamID + * @param view + * @param mediaViewMode 图像拉伸 + */ + void startPlayingStream(String streamID, MediaViewMode mediaViewMode, View view); + + /** + * 观众停止拉流 + * + * @param streamID + */ + void stopPlayingStream(String streamID); +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEventListener.java b/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEventListener.java new file mode 100644 index 000000000..e68a17a47 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/ISudAudioEventListener.java @@ -0,0 +1,95 @@ +package com.yunbao.common.sud.audio; + +import com.alibaba.fastjson.JSONObject; + +import java.util.HashMap; +import java.util.List; + +public interface ISudAudioEventListener { + /** + * 捕获本地音量变化, 可用于展示自己说话音浪大小 + * + * @param soundLevel 本地音量级别,取值范围[0, 100] + */ + void onCapturedSoundLevelUpdate(float soundLevel); + + /** + * 捕获远程音流音量变化, 可用于展示远端说话音浪大小 + * + * @param soundLevels [userId: 音量],音量取值范围[0, 100] + */ + void onRemoteSoundLevelUpdate(HashMap soundLevels); + + /** + * 房间流更新 增、减。可用于知道当前推流人数 + * + * @param roomId 房间id + * @param type 流更新类型 增,减 + * @param streamList 变动流列表 + * @param extendedData 扩展信息 + */ + void onRoomStreamUpdate(String roomId, AudioEngineUpdateType type, List streamList, JSONObject extendedData); + + /** + * 接收自定义指令信息回调 + * + * @param fromUserID 用户 + * @param command 指令内容 + */ + void onRecvCommand(String fromUserID, String command); + + /** + * 接收跨房指令信息回调 + * + * @param fromRoomID 消息的房间 ID + * @param fromUserID 消息的用户 ID + * @param command 指令内容 + */ + void onRecvXRoomCommand(String fromRoomID, String fromUserID, String command); + + /** + * 房间内当前在线用户数量回调 + * + * @param count 人数 + */ + void onRoomOnlineUserCountUpdate(int count); + + /** + * 房间状态变化 + * + * @param state 状态 + * @param errorCode 错误码 + * @param extendedData 扩展信息 + */ + void onRoomStateUpdate(AudioRoomState state, int errorCode, JSONObject extendedData); + + /** + * 监听音频PCM流回调 + * + * @param audioPCMData 音频流数据 + */ + void onCapturedPCMData(AudioPCMData audioPCMData); + + /** + * 观众拉流成功通知 + * + * @param streamID + */ + void onPlayingStreamingAdd(String streamID); + + /** + * 观众拉流结束通知 + * + * @param streamID + */ + void onPlayingStreamingDelete(String streamID); + + /** + * 拉流分辨率变更通知。 + * + * @param streamID 流id + * @param width 宽 + * @param height 高 + */ + void onPlayerVideoSizeChanged(String streamID, int width, int height); +} diff --git a/common/src/main/java/com/yunbao/common/sud/audio/MediaViewMode.java b/common/src/main/java/com/yunbao/common/sud/audio/MediaViewMode.java new file mode 100644 index 000000000..f28264417 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/audio/MediaViewMode.java @@ -0,0 +1,7 @@ +package com.yunbao.common.sud.audio; + +public enum MediaViewMode { + ASPECT_FIT, // 等比缩放,可能有黑边 + ASPECT_FILL, // 等比缩放填充整个 View,可能有部分被裁减 + SCALE_TO_FILL; // 填充整个 View,图像可能被拉伸 +} diff --git a/common/src/main/java/com/yunbao/common/sud/model/AudioJoinRoomModel.java b/common/src/main/java/com/yunbao/common/sud/model/AudioJoinRoomModel.java new file mode 100644 index 000000000..4407efe35 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/sud/model/AudioJoinRoomModel.java @@ -0,0 +1,16 @@ +package com.yunbao.common.sud.model; + +public class AudioJoinRoomModel { + + public String userID; + + public String userName; + + public String roomID; + + public String token; + + public long timestamp; + + public String appId; +} diff --git a/common/src/main/java/com/yunbao/common/utils/LoadDian9TuUtilSud.java b/common/src/main/java/com/yunbao/common/utils/LoadDian9TuUtilSud.java new file mode 100644 index 000000000..cad240b93 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/utils/LoadDian9TuUtilSud.java @@ -0,0 +1,108 @@ +package com.yunbao.common.utils; + +import android.app.Activity; +import android.content.Context; +import android.content.res.AssetManager; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.NinePatch; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.NinePatchDrawable; +import android.os.Build; +import android.text.TextUtils; +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.bumptech.glide.Glide; +import com.bumptech.glide.request.target.CustomTarget; +import com.bumptech.glide.request.transition.Transition; +import com.yunbao.common.manager.IMLoginManager; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +public class LoadDian9TuUtilSud { + private static final List BITMAP_CACHE = new ArrayList<>();//.9图Bitmap缓存 + + public void loadDian9TuAssets(Context context, View imageView, int position) { + if (TextUtils.isEmpty(IMLoginManager.get(context).getKeyDefaultBubbleUrl())) { + Bitmap bitmap = getImageFromAssetsFile(context, "chat_message_bg.png"); + BITMAP_CACHE.add(bitmap); + setNinePathImage(context, imageView, bitmap, position); + } else { + String url = IMLoginManager.get(context).getKeyDefaultBubbleUrl(); + LoadDian9Tu(context, imageView, url, 1); + } + + } + + public void setNinePathImage(Context context, View imageView, Bitmap bitmap, int position) { + if (bitmap == null) + return; + byte[] chunk = bitmap.getNinePatchChunk(); + if (NinePatch.isNinePatchChunk(chunk)) { + NinePatchDrawable patchy = new NinePatchDrawable(context.getResources(), bitmap, chunk, NinePatchChunk.deserialize(chunk, position).mPaddings, null); + imageView.setBackground(patchy); + } + } + + public void LoadDian9Tu(Context context, View imageView, String imgUrl, int position) { + if (context == null) { + return; + } + if (context instanceof Activity) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + if (((Activity) context).isDestroyed()) { + return; + } + } + } + Glide.with(context) + .asFile() + .load(imgUrl) + .into(new CustomTarget() { + @Override + public void onResourceReady(@NonNull File resource, @Nullable Transition transition) { + try { + FileInputStream is = new FileInputStream(resource); + Bitmap bitmap = BitmapFactory.decodeStream(is); + BITMAP_CACHE.add(bitmap); + setNinePathImage(context, imageView, bitmap, position); + is.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void onLoadCleared(@Nullable Drawable placeholder) { + + } + }); + } + + /** + * 从Assets中读取图片 + * + * @param fileName + * @return + */ + private Bitmap getImageFromAssetsFile(Context context, String fileName) { + Bitmap image = null; + AssetManager am = context.getResources().getAssets(); + try { + InputStream is = am.open(fileName); + image = BitmapFactory.decodeStream(is); + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return image; + } +} diff --git a/live/src/main/java/com/yunbao/live/utils/NinePatchChunk.java b/common/src/main/java/com/yunbao/common/utils/NinePatchChunk.java similarity index 98% rename from live/src/main/java/com/yunbao/live/utils/NinePatchChunk.java rename to common/src/main/java/com/yunbao/common/utils/NinePatchChunk.java index 1a275d321..6ebd8c7e4 100644 --- a/live/src/main/java/com/yunbao/live/utils/NinePatchChunk.java +++ b/common/src/main/java/com/yunbao/common/utils/NinePatchChunk.java @@ -1,4 +1,4 @@ -package com.yunbao.live.utils; +package com.yunbao.common.utils; import android.graphics.Rect; diff --git a/common/src/main/java/com/yunbao/common/views/SudGameChatViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameChatViewHolder.java new file mode 100644 index 000000000..a76cbc058 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/SudGameChatViewHolder.java @@ -0,0 +1,49 @@ +package com.yunbao.common.views; + +import android.graphics.Color; +import android.text.Spannable; +import android.text.SpannableStringBuilder; +import android.text.style.ForegroundColorSpan; +import android.view.View; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.utils.LoadDian9TuUtilSud; + +public class SudGameChatViewHolder extends RecyclerView.ViewHolder { + private LinearLayout mBg; + private TextView chatMessage; + + public SudGameChatViewHolder(@NonNull View itemView) { + super(itemView); + mBg = (LinearLayout) itemView.findViewById(R.id.bg); + chatMessage = itemView.findViewById(R.id.chat_message); + + } + + /** + * 幸运100%活动 + */ + public void sudGameChat(SudGameChatImModel msgModel) { + new LoadDian9TuUtilSud().loadDian9TuAssets(itemView.getContext(), mBg, 1); + StringBuffer buffer = new StringBuffer(); + String userName = msgModel.getNickname() + ":"; + buffer.append(userName) + .append(" ") + .append(msgModel.getTextMessage()); + + String msg = buffer.toString(); + + int unameIndexOf = msg.indexOf(userName); + int unameSize = userName.length(); + SpannableStringBuilder builder = new SpannableStringBuilder(); + builder.append(msg); + builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + chatMessage.setText(builder); + } +} diff --git a/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java new file mode 100644 index 000000000..4a8511d0e --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java @@ -0,0 +1,12 @@ +package com.yunbao.common.views; + +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { + public SudGameUserListViewHolder(@NonNull View itemView) { + super(itemView); + } +} diff --git a/live/src/main/java/com/yunbao/live/custom/TopGradual.java b/common/src/main/java/com/yunbao/common/views/TopGradual.java similarity index 97% rename from live/src/main/java/com/yunbao/live/custom/TopGradual.java rename to common/src/main/java/com/yunbao/common/views/TopGradual.java index 7cc8d818f..8e1d3d422 100644 --- a/live/src/main/java/com/yunbao/live/custom/TopGradual.java +++ b/common/src/main/java/com/yunbao/common/views/TopGradual.java @@ -1,4 +1,4 @@ -package com.yunbao.live.custom; +package com.yunbao.common.views; import android.graphics.Canvas; import android.graphics.Color; diff --git a/common/src/main/res/drawable/background_sud_game_input.xml b/common/src/main/res/drawable/background_sud_game_input.xml new file mode 100644 index 000000000..bdbe71942 --- /dev/null +++ b/common/src/main/res/drawable/background_sud_game_input.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/background_sud_game_input_edit_text.xml b/common/src/main/res/drawable/background_sud_game_input_edit_text.xml new file mode 100644 index 000000000..de7f97453 --- /dev/null +++ b/common/src/main/res/drawable/background_sud_game_input_edit_text.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_live_sud_game_back_new.png b/common/src/main/res/drawable/bg_live_sud_game_back_new.png new file mode 100644 index 0000000000000000000000000000000000000000..217fffa4910c4cfb4fca62c278f7df931228f665 GIT binary patch literal 2678 zcmV-+3W@cJP)Px87c6Nb^8nCq~qNt^9tO2qTW@q0FR7x!>Ry0;Z z3Dtx)snJ#q2~cgR0pmxEt;IApZIQIGhBmd7)!3c6^JX?kBRAp-+u-j#K zX5Kx{nSHY^%goN3nfLZ%=DmNGW$)+jopId5qToZ&tYzMri!w;|J>W77_U}ZMyd3Uf$r$&_>`t;TM;oh4Tp$Id9lVaXqx8kWHR|erJ0MRuNn06 z<;z#6nl@Ywz5 zbUMAgr>Ezi)poFI(7LWK0D#BXJVwMRRoANRyxn|6#OmNVrPOA_F#cgT-`I3jfsRBX z*8srJdF`Q^N@s8$wgI+CDUVdzhl)Y#x_&JHJlF`5JRYVc*=Lke-!Kg0FO|Tq2=vO8 zE9WVt_7hRC-iM1)5E(Wi4ra62^~q%N-*#c!2EA|>?+UlO#g>%6$~LjYJ_2WuB@zklX3I8wR!wiDP^iyXNrQhr1=05&Gobldoo~YA!mk$hSnZBbm+qPTtz{L!{J?;rrkJ$ z7VYiPa6gq#DfL1kk=RxibR-h_2mm|+0EO)*_nTK=H4F$LHg|V-pB&q*@e+-ZNaQX6 zxXqgYtAG1M^q7?L;js)a0^Q!;K06o;K9yUUo9}_H8Z__DyqU>lzTDH((_bj%BG7D{ zXqxtY-W9I88ZRT8=dIan_FJh`>OfJ@xf4VOgb<~ii27u;9hvRVnhm}%W6NyAJ4_ept+Y#|j zPo;AhGXSf44@)T@#l?#kH_e+j?*Tr><*jQt3)))$c=7b<)7x>?s#SAL)7;BvmOY7f z7PO^ooYFLHBU(G#2R+D+LmpM3g%CGkI2^uC)3m2OYtS{&Y$bj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_game_bottom_input.xml b/common/src/main/res/drawable/bg_live_sud_game_bottom_input.xml new file mode 100644 index 000000000..4f5623992 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_game_bottom_input.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_live_sud_game_bottom_input_right.xml b/common/src/main/res/drawable/bg_live_sud_game_bottom_input_right.xml new file mode 100644 index 000000000..75e3be568 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_game_bottom_input_right.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_live_sud_game_top_new.xml b/common/src/main/res/drawable/bg_live_sud_game_top_new.xml new file mode 100644 index 000000000..6f5dd06ca --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_game_top_new.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/activity_sud_game.xml b/common/src/main/res/layout/activity_sud_game.xml index 6f6ae2637..ddf4fbc31 100644 --- a/common/src/main/res/layout/activity_sud_game.xml +++ b/common/src/main/res/layout/activity_sud_game.xml @@ -1,57 +1,10 @@ - - - - - - - - - - - - - - @@ -61,73 +14,142 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_sud_game_input.xml b/common/src/main/res/layout/dialog_sud_game_input.xml new file mode 100644 index 000000000..32515abd5 --- /dev/null +++ b/common/src/main/res/layout/dialog_sud_game_input.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_sud_game_chat_item_holder.xml b/common/src/main/res/layout/view_sud_game_chat_item_holder.xml new file mode 100644 index 000000000..d697f53ab --- /dev/null +++ b/common/src/main/res/layout/view_sud_game_chat_item_holder.xml @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_sud_game_user_list_holder.xml b/common/src/main/res/layout/view_sud_game_user_list_holder.xml new file mode 100644 index 000000000..197037ea2 --- /dev/null +++ b/common/src/main/res/layout/view_sud_game_user_list_holder.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat.png b/common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat.png new file mode 100644 index 0000000000000000000000000000000000000000..363e0e3801e6627a31803d55f5fef1b3c7864206 GIT binary patch literal 6267 zcmV->7=-7EP)Py2HAzH4RCr$PT?tf^SH8dZOIQN9fm*48OWi(qacp0 z!>1jsV@jp+eh{7z(vMO)gb?xoW2`U7ap8MI1Ifw5$ovx}Q(W1iuqf{zKG|%pr2qFCmAwgITRs!1+T`JlM z;Gu34A*6v2a+VPCzE-Q%NY#ip^|Tu>k38~-yt=x&b5Kyw!-SA$2_b_BA@w#h-=^L3$c2J|yob-3c{0dBBVj}j9G)n0(LP(f(bqITdzsK&XJ%QaB7-K(} z&E}0KPo6yEs*qH_`vsVxLx)BL2M52vaa^jEUGY*4z)$sXU~@dr?=qQ8+bb$6uKBuM zp8}JVl%%Myub<6v+#E`2FG5J8uLtDg`U43emn;^`zL1cReZ|GaIFkD$`3#tZgoH6N znQS>BB$5z<8P`!+mb-)n&9LGD(1wzdk|K925R+eWU}9rq1A~Kuv9YhPo@nkBKw8sN zxF5Z1GMT<8D=U+f8%PRFe0+R=nM}5nQaaJPmx!4hcYB@?#@N>!$8FMRG#8{AjAX#X z$Hxzm%jNGALb~2VY)dSiLC5Q6vw6{p6DLlIE#xepB*3Utss{-n|3wIa?CD-*U9RX2 zS_Tk87HYNH|8hX-RKf2q{uQ`9S4rsAnuRrPz4cr1osZ=Hq zLiSQhA)dFJpu3XEWHdB1lrx!3yvbx@G8yz#(k6?=LZB!M2?^oQUO+$qZD?q~#!HMw zW6Q~q<2WeGq;1%<+Jc%jsP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pmRS1M40medj0b?Q4E_`1a$I1~8~ z6hHZYSqlk<6qD4q`H?wCTBl6S7$0*cptuovBZ{eanx->ll!*)_k+tM~h^~RIuT7Q- z>MVYf7L?R|Oq)JuG9$_Gr^pinQTqqd7{22S>^FA)_o(tEg^cQ(7^%+YsbWAW88D8U zOmtow{|7Sck$a1VNuOZi?O|y;ighNApn38EiWAgXJJD<7bFy|Fds4wfDmW!~LM_hl z!M~?rQCu0pJWY&kx~!nDv6_S8Qgs#~=iAe9r|3SWjjUZw1)caF8E%bz|4gxK9Z3va zT)z=6YkK$Ozf#NHYHS- z>nZO!SMmO!@GNm!blMFVr}k6nL<2t*np4hhxy?CIMkypoX$)y1aY+wB<@xtVyo-#YEVD1C|0M&LCv{7`)#_w5Po4NHk{{;qu^I2h28^opSP{#NxPG48NU6sj|a#_igK2V8Y&$#dOPWb6=5H*MV|5HU+)l-{JVuF6mQ54N0hM;n}uq8 z+nta*8kwCEm|U>%AQ@IWM?$LEMh#^g2n@kysPo2js71Ly;9e`vdK8lqaBSyoAUn&H!@`9uBu%h00000NkvXXu0mjf5XIL% literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/icon_game_open_wheat.png b/common/src/main/res/mipmap-xxhdpi/icon_game_open_wheat.png new file mode 100644 index 0000000000000000000000000000000000000000..19a8c1b9738ca15b9f66fd88bee29246ba6eabc4 GIT binary patch literal 5400 zcmV+z73b=SP)Px}(n&-?RCr$PT?urQ#g?x6dr2oGgoH&9kS!PzFzF@35O@+4Mh+f_2P2xW2s)0& z05bRnQ4~an5LQ7!pT2qO-`FP#D zPLrg!zyEHDbxt2TbglQRd#mc+Tem0);iS=MWJaS=5g8d7*3#0Vkjv!>jIlUENE~DA zK0=6sF&0iK4JU*|*@x1|7;B=GHW5P1l+r6a&!1+Do#uJILMD@$jYgv-GBVPv)oNQp zb@(*YI;K*o?g!xsA%iKU@r00JjIlu+$Hg+nY=n^8A4(}hviBeVI=*8}x5q{QmI>b_ z_)tnEJ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Uj;Q8wG>@y9-FHInZDjUIU`oltZB+59b0nmJ-853o;c{aDnhDMu)1e9F{sZ?~ zakik?j&{62(pkAXeicPlQ(z@^w9?8>hO$j{U2U|tap>0m{{Y}OcI9fx6?^~y002ov JPDHLkV1nu8dGP=M literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/icon_send_game.png b/common/src/main/res/mipmap-xxhdpi/icon_send_game.png new file mode 100644 index 0000000000000000000000000000000000000000..13b06a19049b446a576d3a1a77fad158b73df72a GIT binary patch literal 13814 zcmVPyA07*naRCr$PeG80b$ywfCb-KuJ2p$$wRgPJ zGu_kg+kIc>RK@2}=l)fv>OAf}w`a!NBaioX&$*}SRMlVq_kaIa{~>Vl=VSyJ3sEhIl2GcKLVWdU=0%z{HL@vSB7B( z_gGn33I6+oZ}`*Z9Kck=+W%V0;rjsC*8m}}CIAoF4Lj_*)T;jj{v}cVJ$UToHTc(| zDMsH@uN4>KNsg|Ko5dYM-xnXlksl0uFbRnVksmC$KDs8pkNRwezUtZyr(e@9dX~7K zs9iBO(i%t48{9JbS$s~+k1}@gkVelKE=n{c8RIFQMH>H<@r=-SeAP~r(O45Vr>@%%&!L|vf%{lu;CV$>}P<3iII0bbzZ zUbrpof*lxSXj2Ab!UiX<5erSbm`#R{78V{Ct?_FXIyS1feckd<+Q)r0E_B0v0#G50 zDtklpy#l4-U-19h6#7T*4kz$uu17xn`MvtDe)HQubhNsB9>ScQ2!iwAay>I=Yiq-!Q1n4AYvO0jZmv3@4JF zTG^!hRtTZMICnX~4c4dswtnGPf9=YZ75j-NF8PKL^t33nFJu_LQCz-!nLG|apTDt4 z-v0Kh)3f#$|8vcOAL;wuLJKd#e9^)WchAB85H6}<`HC^qE(Wy7rO8qzMf$EVF4IE7 z-$e^gGEDs4w6;PMG#aL6Aw^alPPo=12#*zR6v3Y?$cOKvLOz|hlNKM^xMDAhyymE$ zwMbjx0vZmcM*Vbb3f&(6;ET7X-t&Jy_WJ#Y&#m)kzXDb+U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S_J9iN|*4&0#;uq?`5*Kgc~ zisLZfXE3YBnFq`P+w1eLN5Jy9M_p32daTuRNzLk2ZPsrd^!qytGu}h(b$4SP*b`r& zWKHao>G28~hA@uHmoJm0OH1UT5AD#6ZkOKfzGP27{I#^z+OVgHW3j`o1x?%HZQF9H zoc5?i80%1KH3+3Hfo>K0{(qxCt~>aAhvwm=*}G^2Y}<}^b;sXdt6gBs=FB_fl-5{< zdA#2xjMQBZxa(1hUR3)L!n;i*}6?eaB#$w0}bJ#t~gh;9~q z&u6WcmX^rQ&c|uDTcxji-8Yi!*PpX$wI*ry=4iL?QK!-&J(ts|Nq}~zLYkA4&~A50 zr_&v_?Yn3SPr5Sh5vbLwyk4*J*1-YPYdyYy08p_B>-TEB>R7B**=C(ii{F3$Bi?5} z` z6FBGV57)u}|E-7j~{-+G>0z&G#bFJ0l?!v zT-sdXYinz;ytXEerWQ5^JUV4A&M>O^3hV4ctxJ~xE?#_&tgbEx?OnZkjQ~6ze17)c zo1c>&-@y?GS53Hbo_Jy@SY{V5uEFZ+BmDAZ_)7S2DaZmwi+Lo25G|Ey7~_C!cW^pR sn!bxipp?abvS9Dx89wRS-8lmPAJJi{WZ^_wYXATM07*qoM6N<$f~jP$*Z=?k literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/icon_sud_history_live_new.png b/common/src/main/res/mipmap-xxhdpi/icon_sud_history_live_new.png new file mode 100644 index 0000000000000000000000000000000000000000..f9c550e28bee3794d25977f8bb8c04d7d946974a GIT binary patch literal 6035 zcmWldby!n<6vqd`m>?x6BS%O}N-8m8AfrRNK~j)zX(=~Cz(52Bmkl@Bm&fG1ihg8Q*up>C&{P>!q$7BxsWdGG*)8`YtVFU|WWmy5DdnmKt4<)ljU8U(gjuVkc zrW!_ztf@i{zohxy`h%+CQ+z6$U-OPi55e2=6Ux6Pwf8Vo5_$(6oeWl>I<~NhuXz-& zQ!++*Bm-khuqEpDTtrnt6rYA6orT$y^U@fgc1yD6^k36NFJ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$!JLb4_{Jf$-OhEtHt(iM7!~DgQkgHYC(htO({~U zO5-_NR{;EJK{@x0U3v4#N1hN??lXV{*O~k(omk&|75K?QSc!&dB|pj@ansC_q;tMg zy&)26z4$sZGSb$Bd38Lgj)^H=GMcKv;2x$cRsDryZEORGJ2)T!&Sk{&MTuJV6PKvv zOG^ag3}#dmioCzLCU-EB>D1^_b@V%)CIJq9rA2@yP)TIk+}z*45$*OQGq)LSpciZG z=y=xr^~aBMSzbQ#;HW3$HO~LzpzK_3eBL$ptAhfBeQEFD;9z>wle(#kxD?tE3l+GX1-v5t#fP*6~hwo@%S*~)_n0~_mT0xcLz z>P?i#<(?AfABVF-IFX>VsqS4ku31%H;tE#Fv(DPZ$?a&Tp$~@bTe*=vKrfMXhjHjjIb9stg z6WPQHQk>~D7Gvf5;S$s@k0Elupo~af<_SF^KjHkEq)x|TYN-1xh$Op2g(kW**%)Gd z_()FkRg8#Vir%?}w>P$)8OLT-U*bQoBiB0{92|ThAt9mYNAdHd-KA6 literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/icon_vacancy_sud_game.png b/common/src/main/res/mipmap-xxhdpi/icon_vacancy_sud_game.png new file mode 100644 index 0000000000000000000000000000000000000000..d2475e35d1633907bc34762661e253b69535dad8 GIT binary patch literal 3409 zcmV-X4X*NuP)Px?3rR#lRCr$PU3+XC#Tox*cGu@;oF+a)98hU#sBlH=awN7B-`(1wA}K@#skDfa zLaM%y+*&P_@{jo|`GY_DN}7mPqN$pQibAWlB!L9U_U6uxLK?eVv`1L(7R5%LbUby1H8m3JSJTN)Zs01Z5%9 zonl-vc!Us?syJh8U}k2f?aY}o|8wIZe}gvpuk^0;8&G1!L@9LdbgDtP}e}wkK_to>=mxIOiX5&R>p3qy1*v zrduy7z^JNP$~kZ3oNpn7OfPpp7Lg)6Jm81aMF{E8G;J(h#;0nZQDCa8s|);oe=Pvi z5kl~ItEU>!GXGr$fML#gPk(=Z&s%T3g-7y?l#Bt>(9m$3EX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~ z5>qfhgfAYCD~vG=6unN8q#G!u82_>yb9Lg)TVx?j?Rh0TVAfuSY00000NkvXXu0mjf$0coR literal 0 HcmV?d00001 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 6eedc57e5..584af597c 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1428,4 +1428,5 @@ Limited ride And limited avatar frame The quantity of goods exchanged has reached the upper limit Successfully opened You have purchased the BattlePass + 評論 diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiveHotDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiveHotDialogFragment.java index 84b75209c..0e748b6e6 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiveHotDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiveHotDialogFragment.java @@ -24,9 +24,7 @@ import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; -import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; -import com.yunbao.common.bean.LevelBean; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; @@ -36,7 +34,7 @@ import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.bean.HotBean; -import com.yunbao.live.custom.TopGradual; +import com.yunbao.common.views.TopGradual; import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.live.utils.LiveTextRender; diff --git a/live/src/main/java/com/yunbao/live/utils/LoadDian9TuUtil.java b/live/src/main/java/com/yunbao/live/utils/LoadDian9TuUtil.java index 634f805c9..90c95bb03 100644 --- a/live/src/main/java/com/yunbao/live/utils/LoadDian9TuUtil.java +++ b/live/src/main/java/com/yunbao/live/utils/LoadDian9TuUtil.java @@ -19,6 +19,7 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.request.target.CustomTarget; import com.bumptech.glide.request.transition.Transition; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.NinePatchChunk; import com.yunbao.live.activity.LiveActivity; import java.io.File; diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index ae325bc80..1b5c91314 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -160,7 +160,7 @@ import com.yunbao.live.bean.LiveWishlistBean; import com.yunbao.live.bean.WishlistItemModel; import com.yunbao.live.custom.LiveLightView; import com.yunbao.live.custom.RightGradual; -import com.yunbao.live.custom.TopGradual; +import com.yunbao.common.views.TopGradual; import com.yunbao.live.dialog.GiftWallDialog; import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog; import com.yunbao.live.dialog.LiveFaceUnityDialogFragment; diff --git a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java index 4a0f83171..f77180201 100644 --- a/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/SystemMessageViewHolder.java @@ -67,7 +67,7 @@ import com.yunbao.live.adapter.YouLikeMessageAdapter; import com.yunbao.live.bean.SearchUserBean; import com.yunbao.live.bean.SystemMessageBean; import com.yunbao.live.bean.YouLikeBean; -import com.yunbao.live.custom.TopGradual; +import com.yunbao.common.views.TopGradual; import com.yunbao.live.http.ImHttpConsts; import com.yunbao.live.http.ImHttpUtil; From a036e5eff604dc57ac9aa50bb1ae6279dacadce3 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 11 Jan 2024 15:15:21 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=88=BF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/AndroidManifest.xml | 4 +- .../adapter/SudGameUserListAdapter.java | 66 ++++- .../yunbao/common/bean/SudGameUserModel.java | 57 ++++ .../common/dialog/CreateSudGamePopup.java | 6 +- .../dialog/SudGameSmallPopupPindow.java | 73 +++++ .../yunbao/common/event/SudGameUserEvent.java | 17 ++ .../com/yunbao/common/http/PDLiveApi.java | 25 +- .../common/http/live/LiveNetManager.java | 120 ++++++++- .../manager/imrongcloud/GameMicManager.java | 103 ++++++- .../com/yunbao/common/utils/RouteUtil.java | 6 + .../common/views/SudGameListViewHolder.java | 10 +- .../views/SudGameUserListViewHolder.java | 74 +++++ .../bg_live_sud_list_select_item2.xml | 16 ++ .../main/res/layout/view_sud_game_small.xml | 29 ++ .../layout/view_sud_game_user_list_holder.xml | 27 +- .../backgroud_sud_game_small_window.png | Bin 0 -> 4404 bytes .../icon_game_close_wheat_mute.png | Bin 0 -> 2137 bytes common/src/main/res/values/strings.xml | 3 + live/src/main/AndroidManifest.xml | 3 + .../live}/activity/SudGameActivity.java | 255 ++++++++++++++++-- .../live/dialog/LiveUserDialogFragment.java | 21 +- .../yunbao/main/activity/MainActivity.java | 11 + .../main/views/MainHomeGameViewHolder.java | 2 +- 23 files changed, 880 insertions(+), 48 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java create mode 100644 common/src/main/java/com/yunbao/common/event/SudGameUserEvent.java create mode 100644 common/src/main/res/drawable/bg_live_sud_list_select_item2.xml create mode 100644 common/src/main/res/layout/view_sud_game_small.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/backgroud_sud_game_small_window.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat_mute.png rename {common/src/main/java/com/yunbao/common => live/src/main/java/com/yunbao/live}/activity/SudGameActivity.java (61%) diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml index d9bf690aa..5b9ff7982 100644 --- a/common/src/main/AndroidManifest.xml +++ b/common/src/main/AndroidManifest.xml @@ -56,9 +56,7 @@ - + gameUserModels = new ArrayList<>(); + private boolean micMax = false; public SudGameUserListAdapter(List gameUserModels) { @@ -42,6 +43,34 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { } + public void refreshSudGameUserList(List gameUserModels) { + this.gameUserModels.clear(); + if (gameUserModels.size() < 7) { + micMax = false; + this.gameUserModels.addAll(gameUserModels); + for (int i = 0; i < this.gameUserModels.size(); i++) { + this.gameUserModels.get(i).setNullUser(false); + } + int size = 7 - gameUserModels.size(); + for (int i = 0; i < size; i++) { + this.gameUserModels.add(new SudGameUserModel().setNullUser(true)); + } + } else if (gameUserModels.size() == 7) { + micMax = true; + this.gameUserModels.addAll(gameUserModels); + for (int i = 0; i < this.gameUserModels.size(); i++) { + this.gameUserModels.get(i).setNullUser(false); + } + } else { + micMax = true; + + for (int i = 0; i < 7; i++) { + this.gameUserModels.add(gameUserModels.get(i).setNullUser(false)); + } + } + notifyDataSetChanged(); + } + @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { @@ -51,11 +80,44 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - + SudGameUserListViewHolder sudGameUserListViewHolder = (SudGameUserListViewHolder) holder; + sudGameUserListViewHolder.upData(gameUserModels.get(position), sudGameSmallCallBack,position); } @Override public int getItemCount() { return gameUserModels.size(); } + + public boolean isMicMax() { + return micMax; + } + + public void muteUser(String userID, boolean mute, int position) { + for (int i = 0; i < gameUserModels.size(); i++) { + SudGameUserModel sudGameUserModel = gameUserModels.get(i); + if (!sudGameUserModel.isNullUser()) { + if (TextUtils.equals(userID, String.valueOf(sudGameUserModel.getId()))) { + gameUserModels.get(i).setMicStatus(mute ? 1 : 3); + + } + } + } + notifyItemChanged(position); + } + + private SudGameSmallCallBack sudGameSmallCallBack; + + public SudGameUserListAdapter setSudGameSmallCallBack(SudGameSmallCallBack sudGameSmallCallBack) { + this.sudGameSmallCallBack = sudGameSmallCallBack; + return this; + } + + public interface SudGameSmallCallBack { + void unMute(String userID, int position); + + void mute(String userID, int position); + + void viewInformation(SudGameUserModel sudGameUserModel); + } } diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java index e7b45af68..2a55fac19 100644 --- a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java @@ -1,7 +1,19 @@ package com.yunbao.common.bean; +import com.google.gson.annotations.SerializedName; + public class SudGameUserModel extends BaseModel { private boolean nullUser; + @SerializedName("user_nicename") + private String userNicename; + @SerializedName("avatar") + private String avatar; + @SerializedName("sex") + private int sex; + @SerializedName("id") + private int id; + @SerializedName("mic_status") + private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风 public boolean isNullUser() { return nullUser; @@ -11,4 +23,49 @@ public class SudGameUserModel extends BaseModel { this.nullUser = nullUser; return this; } + + public String getUserNicename() { + return userNicename; + } + + public SudGameUserModel setUserNicename(String userNicename) { + this.userNicename = userNicename; + return this; + } + + public String getAvatar() { + return avatar; + } + + public SudGameUserModel setAvatar(String avatar) { + this.avatar = avatar; + return this; + } + + public int getSex() { + return sex; + } + + public SudGameUserModel setSex(int sex) { + this.sex = sex; + return this; + } + + public int getId() { + return id; + } + + public SudGameUserModel setId(int id) { + this.id = id; + return this; + } + + public int getMicStatus() { + return micStatus; + } + + public SudGameUserModel setMicStatus(int micStatus) { + this.micStatus = micStatus; + return this; + } } diff --git a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java index 6b6026048..d265f74ea 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java @@ -21,7 +21,6 @@ import com.lxj.xpopup.XPopup; import com.lxj.xpopup.core.BottomPopupView; import com.lxj.xpopup.enums.PopupPosition; import com.yunbao.common.R; -import com.yunbao.common.activity.SudGameActivity; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.CustomSidebarChildModel; import com.yunbao.common.event.CheckCurrencyModel; @@ -33,6 +32,7 @@ import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -279,9 +279,7 @@ public class CreateSudGamePopup extends BottomPopupView { public void onSuccess(CreateSudRoomModel data) { if (isHome) { dialog.dismiss(); - Intent intent = new Intent(getContext(), SudGameActivity.class); - intent.putExtra("CreateSudRoom", new Gson().toJson(data)); - getContext().startActivity(intent); + RouteUtil.forwardSudGameActivity(new Gson().toJson(data)); } else { Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data)); diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java b/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java new file mode 100644 index 000000000..089e34caa --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java @@ -0,0 +1,73 @@ +package com.yunbao.common.dialog; + +import android.content.Context; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.core.AttachPopupView; +import com.yunbao.common.R; +import com.yunbao.common.bean.SudGameUserModel; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +public class SudGameSmallPopupPindow extends AttachPopupView { + private TextView viewUnMute; + private boolean mute; + private SudGameUserModel sudGameUserModel; + private SudGameSmallCallBack sudGameSmallCallBack; + + public SudGameSmallPopupPindow(@NonNull Context context, SudGameUserModel sudGameUserModel, boolean mute, SudGameSmallCallBack sudGameSmallCallBack) { + super(context); + this.mute = mute; + this.sudGameUserModel = sudGameUserModel; + this.sudGameSmallCallBack = sudGameSmallCallBack; + } + + @Override + protected int getImplLayoutId() { + return R.layout.view_sud_game_small; + } + + @Override + protected void onCreate() { + viewUnMute = findViewById(R.id.view_un_mute); + if (mute) { + viewUnMute.setText(WordUtil.isNewZh() ? "取消靜音" : "Unmute"); + } else { + viewUnMute.setText(WordUtil.isNewZh() ? "靜音" : "Mute"); + } + ViewClicksAntiShake.clicksAntiShake(viewUnMute, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (sudGameUserModel.getMicStatus() == 3) { + ToastUtil.show("对方未开麦!"); + return; + } + if (!mute) { + sudGameSmallCallBack.mute(); + } else { + sudGameSmallCallBack.unMute(); + } + dismiss(); + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.view_information), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + sudGameSmallCallBack.viewInformation(sudGameUserModel); + dismiss(); + } + }); + + } + + public interface SudGameSmallCallBack { + void unMute(); + + void mute(); + + void viewInformation(SudGameUserModel sudGameUserModel); + } +} diff --git a/common/src/main/java/com/yunbao/common/event/SudGameUserEvent.java b/common/src/main/java/com/yunbao/common/event/SudGameUserEvent.java new file mode 100644 index 000000000..af9fae6f1 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/event/SudGameUserEvent.java @@ -0,0 +1,17 @@ +package com.yunbao.common.event; + +import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.SudGameUserModel; + +public class SudGameUserEvent extends BaseModel { + private SudGameUserModel sudGameUserModel; + + public SudGameUserModel getSudGameUserModel() { + return sudGameUserModel; + } + + public SudGameUserEvent setSudGameUserModel(SudGameUserModel sudGameUserModel) { + this.sudGameUserModel = sudGameUserModel; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index b6e092d7e..6d0c57c72 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -62,6 +62,7 @@ import com.yunbao.common.bean.SearchModel; import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.SlideInBannerModel; import com.yunbao.common.bean.StarChallengeStatusModel; +import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.bean.SudRoomListModel; import com.yunbao.common.bean.SudgameCodeModel; import com.yunbao.common.bean.UserAreaBean; @@ -1115,24 +1116,42 @@ public interface PDLiveApi { @Query("battle_pass_points_id") String battlePassPointsId, @Query("count") String count ); + @GET("/api/public/?service=Livebattlepass.getBattlePassUserInfo") Observable> getBattlePassUserInfo(); @GET("/api/public/?service=Livebattlepass.getLiveBattlePassRewards") Observable> getLiveBattlePassRewards(); + @GET("/api/public/?service=Livebattlepass.getRewards") Observable>> getRewards( - @Query("live_battle_pass_level_id")String rewardLevelId, - @Query("live_battle_pass_rewards_id")String rewardId + @Query("live_battle_pass_level_id") String rewardLevelId, + @Query("live_battle_pass_rewards_id") String rewardId ); + @GET("/api/public/?service=Livebattlepass.getBattlePassTask") Observable> getBattlePassTask(); + @GET("/api/public/?service=Livebattlepass.getTask") - Observable>> getTask(@Query("task_id")String taskId); + Observable>> getTask(@Query("task_id") String taskId); + @GET("/api/public/?service=Livebattlepass.getBattlePassPoints") Observable>> getBattlePassPoints(); + @GET("/api/public/?service=Livebattlepass.battlePassRule") Observable> battlePassRule(); + @GET("/api/public/?service=Livebattlepass.addChatCount") Observable>> addChatCount(); + + @GET("/api/public/?service=Sudgameserver.joinMic") + Observable>> joinMic(@Query("room_id") String roomId); + @GET("/api/public/?service=Sudgameserver.onMic") + Observable>> onMic(@Query("room_id") String roomId); + @GET("/api/public/?service=Sudgameserver.offMic") + Observable>> offMic(@Query("room_id") String roomId); + @GET("/api/public/?service=Sudgameserver.leaveMic") + Observable>> leaveMic(@Query("room_id") String roomId); + @GET("/api/public/?service=Sudgameserver.getRoomMicData") + Observable>> getRoomMicData(@Query("room_id") String roomId); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index ba14573fa..2a27a2328 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -58,6 +58,7 @@ import com.yunbao.common.bean.RedPacketInfoModel; import com.yunbao.common.bean.RedPacketListBean; import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.StarChallengeStatusModel; +import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.bean.SudRoomListModel; import com.yunbao.common.bean.SudgameCodeModel; import com.yunbao.common.bean.UserAreaBean; @@ -485,7 +486,7 @@ public class LiveNetManager { * @param liveUid */ public void leaveRoomNew(String stream, String liveUid, HttpCallback callback) { - Log.e("观看时长","leaveRoomNew-----------------------"+liveUid); + Log.e("观看时长", "leaveRoomNew-----------------------" + liveUid); API.get().pdLiveApi(mContext) .leaveRoomNew("g" + liveUid, stream) .subscribeOn(Schedulers.io()) @@ -2769,6 +2770,7 @@ public class LiveNetManager { } }).isDisposed(); } + public void addChatCount(HttpCallback callback) { API.get().pdLiveApi(mContext) .addChatCount() @@ -2790,6 +2792,122 @@ public class LiveNetManager { } }).isDisposed(); } + + public void joinMic(String roomId, HttpCallback callback) { + API.get().pdLiveApi(mContext) + .joinMic(roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg())); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + + public void onMic(String roomId, HttpCallback callback) { + API.get().pdLiveApi(mContext) + .onMic(roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg())); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + + public void offMic(String roomId, HttpCallback callback) { + API.get().pdLiveApi(mContext) + .offMic(roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg())); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + + public void leaveMic(String roomId, HttpCallback callback) { + API.get().pdLiveApi(mContext) + .leaveMic(roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg())); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + + public void getRoomMicData(String roomId, HttpCallback> callback) { + API.get().pdLiveApi(mContext) + .getRoomMicData(roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + /** * 直播间取消网络请求 */ diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java index abd8b6d7f..357197f1a 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java @@ -5,9 +5,11 @@ import android.text.TextUtils; import android.util.Log; import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.event.SudGameSocketImEvent; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; @@ -24,6 +26,7 @@ import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback; import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback; import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener; import cn.rongcloud.rtc.api.stream.RCRTCInputStream; +import cn.rongcloud.rtc.base.RCRTCParamsType; import cn.rongcloud.rtc.base.RCRTCRoomType; import cn.rongcloud.rtc.base.RTCErrorCode; import io.rong.imlib.IRongCallback; @@ -50,7 +53,7 @@ public class GameMicManager { */ @Override public void onRemoteUserPublishResource(RCRTCRemoteUser rcrtcRemoteUser, final List list) { - subscribeAVStream(); +// subscribeAVStream(); } @Override @@ -147,6 +150,7 @@ public class GameMicManager { } inputStreams.addAll(remoteUser.getStreams()); + } if (inputStreams.size() == 0) { @@ -175,6 +179,88 @@ public class GameMicManager { }); } + + public void refreshStreams(List personList) { + final List inputStreams = new ArrayList<>(); + + for (SudGameUserModel sudGameUserModel : personList) { + List rcrtcRemoteUsers = mRtcRoom.getRemoteUsers(); + + for (RCRTCRemoteUser rcrtcRemoteUser : rcrtcRemoteUsers) { + if (TextUtils.equals(rcrtcRemoteUser.getUserId(), String.valueOf(sudGameUserModel.getId()))) { + for (RCRTCInputStream rcrtcInputStream : rcrtcRemoteUser.getStreams()) { + rcrtcInputStream.mute(sudGameUserModel.getMicStatus() == 3); + } + inputStreams.addAll(rcrtcRemoteUser.getStreams()); + } + } + } + if (inputStreams.size() == 0) { + return; + } + mRtcRoom.getLocalUser().subscribeStreams(inputStreams, new IRCRTCResultCallback() { + @Override + public void onSuccess() { + + + try { + getView().onSubscribeSuccess(inputStreams); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode errorCode) { + try { + getView().onSubscribeFailed(); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + } + + public void refreshStreams(String userID, boolean mute, int position) { + + final List inputStreams = new ArrayList<>(); + + List rcrtcRemoteUsers = mRtcRoom.getRemoteUsers(); + + for (RCRTCRemoteUser rcrtcRemoteUser : rcrtcRemoteUsers) { + if (TextUtils.equals(rcrtcRemoteUser.getUserId(), String.valueOf(userID))) { + for (RCRTCInputStream rcrtcInputStream : rcrtcRemoteUser.getStreams()) { + rcrtcInputStream.mute(mute); + } + inputStreams.addAll(rcrtcRemoteUser.getStreams()); + } + } + if (inputStreams.size() == 0) { + return; + } + mRtcRoom.getLocalUser().subscribeStreams(inputStreams, new IRCRTCResultCallback() { + @Override + public void onSuccess() { + + + try { + getView().onSubscribeSuccess(userID,mute,position); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + + @Override + public void onFailed(RTCErrorCode errorCode) { + try { + getView().onSubscribeFailed(userID); + } catch (IllegalStateException e) { + e.printStackTrace(); + } + } + }); + } + public void unPublishStreams() { if (mRtcRoom == null) { return; @@ -263,8 +349,9 @@ public class GameMicManager { //打开扬声器。 RCRTCEngine.getInstance().enableSpeaker(true); // 启用耳返功能 -// RCRTCEngine.getInstance().getDefaultAudioStream().enableEarMonitoring(true); + RCRTCEngine.getInstance().getDefaultAudioStream().enableEarMonitoring(true); RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(false); + RCRTCEngine.getInstance().getDefaultAudioStream().setAudioQuality(RCRTCParamsType.AudioQuality.MUSIC_HIGH, RCRTCParamsType.AudioScenario.MUSIC_CHATROOM); } public void joinRoom(String roomId) { @@ -272,6 +359,7 @@ public class GameMicManager { RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create() // 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO .setRoomType(RCRTCRoomType.MEETING) + .build(); RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback() { @Override @@ -348,6 +436,13 @@ public class GameMicManager { //正常文字消息 if (TextUtils.equals(msgDTO.getMethod(), "SendMsg")) { getView().insertItem(new SudGameChatImModel().setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt())); + } else if (TextUtils.equals(msgDTO.getMethod(), "sudGameRoomVoiceList")) { + List personList = new Gson().fromJson(msgDTO.getCt(), new TypeToken>() { + }.getType()); + getView().refreshSudGameUserList(personList); + + refreshStreams(personList); + } } @@ -419,11 +514,15 @@ public class GameMicManager { void onSubscribeSuccess(List inputStreamList); void onSubscribeFailed(); + void onSubscribeSuccess(String userID,boolean mute, int position); + void onSubscribeFailed(String userID); void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser); void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser); void insertItem(SudGameChatImModel sudGameChatImModel); + + void refreshSudGameUserList(List personList); } } diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java index 014623583..2b2f138e9 100644 --- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java @@ -46,12 +46,18 @@ public class RouteUtil { public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity"; public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity"; public static final String PATH_BattlePassActivity="/main/BattlePassActivity"; + public static final String PATH_SudGameActivity="/live/SudGameActivity"; public static void forwardFansActivity(String uid) { ARouter.getInstance().build(PATH_FANSACTIVITY) .withString(Constants.TO_UID, uid) .navigation(); } + public static void forwardSudGameActivity(String CreateSudRoom) { + ARouter.getInstance().build(PATH_SudGameActivity) + .withString("CreateSudRoom", CreateSudRoom) + .navigation(); + } public static void forwardMyWebViewActivity2(String url) { ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY2) diff --git a/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java index f5832bad5..c87f93e08 100644 --- a/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java @@ -15,7 +15,6 @@ import com.google.gson.Gson; import com.lxj.xpopup.XPopup; import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.R; -import com.yunbao.common.activity.SudGameActivity; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.SudRoomListModel; @@ -107,9 +106,8 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { createSudRoomModel.setSudGameName(model.getSudGameName()); if (isHome) { if (TextUtils.equals(model.getLiveUid(), "0")) { - Intent intent = new Intent(itemView.getContext(), SudGameActivity.class); - intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel)); - itemView.getContext().startActivity(intent); + RouteUtil.forwardSudGameActivity(new Gson().toJson(createSudRoomModel)); + } else { String yes = "是"; if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { @@ -158,9 +156,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { @Override public void onCancel() { - Intent intent = new Intent(itemView.getContext(), SudGameActivity.class); - intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel)); - itemView.getContext().startActivity(intent); + RouteUtil.forwardSudGameActivity(new Gson().toJson(createSudRoomModel)); } })).show(); diff --git a/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java index 4a8511d0e..6dce6f6ef 100644 --- a/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java @@ -1,12 +1,86 @@ package com.yunbao.common.views; import android.view.View; +import android.widget.FrameLayout; +import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import com.lxj.xpopup.XPopup; +import com.lxj.xpopup.enums.PopupPosition; +import com.makeramen.roundedimageview.RoundedImageView; +import com.yunbao.common.R; +import com.yunbao.common.adapter.SudGameUserListAdapter; +import com.yunbao.common.bean.SudGameUserModel; +import com.yunbao.common.dialog.SudGameSmallPopupPindow; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.utils.Bus; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { + private ImageView vacancy_sud_game, mic_status; + private FrameLayout user_layout; + private RoundedImageView sud_game_user; + public SudGameUserListViewHolder(@NonNull View itemView) { super(itemView); + vacancy_sud_game = itemView.findViewById(R.id.vacancy_sud_game); + sud_game_user = itemView.findViewById(R.id.sud_game_user); + user_layout = itemView.findViewById(R.id.user_layout); + mic_status = itemView.findViewById(R.id.mic_status); + } + + public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) { + if (sudGameUserModel.isNullUser()) { + vacancy_sud_game.setVisibility(View.VISIBLE); + user_layout.setVisibility(View.GONE); + ViewClicksAntiShake.clicksAntiShake(vacancy_sud_game, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + Bus.get().post(sudGameUserModel); + } + }); + } else { + vacancy_sud_game.setVisibility(View.GONE); + user_layout.setVisibility(View.VISIBLE); + ImgLoader.display2(itemView.getContext(), sudGameUserModel.getAvatar(), sud_game_user); + if (sudGameUserModel.getMicStatus() == 2) { + ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_open_wheat, mic_status); + } else if (sudGameUserModel.getMicStatus() == 3) { + ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat, mic_status); + } else if (sudGameUserModel.getMicStatus() == 1) { + ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat_mute, mic_status); + } + ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + XPopup.Builder builder = new XPopup.Builder(itemView.getContext()).atView(user_layout); + builder.hasShadowBg(false) + .isDestroyOnDismiss(true) + .isLightStatusBar(false) + .popupPosition(PopupPosition.Bottom) + .asCustom(new SudGameSmallPopupPindow(itemView.getContext(), + sudGameUserModel, + sudGameUserModel.getMicStatus() == 1, + new SudGameSmallPopupPindow.SudGameSmallCallBack() { + @Override + public void unMute() { + sudGameSmallCallBack.unMute(sudGameUserModel.getId() + "",position); + } + + @Override + public void mute() { + sudGameSmallCallBack.mute(sudGameUserModel.getId() + "",position); + } + + @Override + public void viewInformation(SudGameUserModel sudGameUserModel) { + sudGameSmallCallBack.viewInformation(sudGameUserModel); + } + })).show(); + } + }); + } } } diff --git a/common/src/main/res/drawable/bg_live_sud_list_select_item2.xml b/common/src/main/res/drawable/bg_live_sud_list_select_item2.xml new file mode 100644 index 000000000..b18c8a2d6 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_list_select_item2.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_sud_game_small.xml b/common/src/main/res/layout/view_sud_game_small.xml new file mode 100644 index 000000000..8c8d2aae6 --- /dev/null +++ b/common/src/main/res/layout/view_sud_game_small.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_sud_game_user_list_holder.xml b/common/src/main/res/layout/view_sud_game_user_list_holder.xml index 197037ea2..4f6049b06 100644 --- a/common/src/main/res/layout/view_sud_game_user_list_holder.xml +++ b/common/src/main/res/layout/view_sud_game_user_list_holder.xml @@ -1,5 +1,6 @@ + android:src="@mipmap/icon_vacancy_sud_game" + android:visibility="visible" /> + android:visibility="visible"> + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/backgroud_sud_game_small_window.png b/common/src/main/res/mipmap-xxhdpi/backgroud_sud_game_small_window.png new file mode 100644 index 0000000000000000000000000000000000000000..fed69cb327fead1103316311670bd94e439edc6a GIT binary patch literal 4404 zcmeHL`#Tf*A0J6l?iGow+)^i(LoP8xa&ImvcdFG??#Fdz#wnFs!eQ22O2vs#VH;yp zPPCL+llwMz;n-ZpFt+c`fARgH&+~kq&*ynQ&*%Mop7-;9z22|aC({GsC?l;Z4FCXS zoSp2wL~92CAf_xODcbR$xN3mdt}EU*E^7cHA)f>QQId6bK3ET@OkP1qDTU*?i$0u+lv-K&SK8;1yJOZ(Xy) z@XROWkerl_;m`wn(mMiKJf9T7)*J%*&ez57(n26m;!V}s?a0Xb{SxAG8ldF3$k5Qx z*@fB$+2nG(ULmE;+s6m*dD*8mP(`9&s&8n>9IPe_-kz_n2yVUJDM`lT2M;MLW3f>r z3&V(!CT6%P-_uYfr3QyfU}dD2H}=`s1g4z}8?Y~=OjBc9#*iEmKazus7uCv$K|yXSpTL?SVu zB55*{y%r^@>Z)K~EpBq|+-{#gpN_-f_K)JDsM?DAm83IzH^+=IZi3uZ?mT@-G`ow6 zi`j0kyuygBt--UqAC5xX|4v;lmFny3i@pPt_s#E_frSsfJuyV1P4G#m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iuG@iIUmQHfThXNgyb7Nn^!F3o&vOV+Q=rme7 zVD68-@Bfh^kdKSXATn-snj&{HZRntctAY(cZ*{r`mg(6CtI zgz z^caxGmYoE%0CA`@u#i&H5<4eZ-@Y+Iw%S?l zq>lXO?U1afU~=m2S2^&`6P_5Il#^P!Go;cOH;RiG<}nde!r&#gPj?_N+FBtxF@?vesjXj~`--`& zmg^wIxV$QV)6f9^ec4J9wC50sCQ4+iK054t>J9-Pzc>(%KoDgz>>fp1Gxq3zuV+Il zAl2V)p@U#BYI#}hn>SpMi!?rb`0(P9v;HRk#tIbnsw@}$%zN(fbCJPdXd`&+=B1@2 z_R$ZCRA~|?vd` z0?)mt)H-%Q{-$#9h)C)?oi2LM&fTjlbsH#>=+Kk-k65FlSPHC>a;v9U`%QB-S8;}X Z;lZP-sFRE~(KiUd`69%=-tO9;{{vV5ri}mq literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat_mute.png b/common/src/main/res/mipmap-xxhdpi/icon_game_close_wheat_mute.png new file mode 100644 index 0000000000000000000000000000000000000000..8f78bc3f8541268df1f2667da21649a4f25650f4 GIT binary patch literal 2137 zcmV-f2&VUmP)Px-6G=otR9HuySbuO-R~0_z-uK?V_coiP0V2gh0!>327_%D!BdwiU6=xisPCB+) zi`sFjqtqFzj?};uai&vf#o88X$yf%*jul3#Q!Rfuv?@%iGY*km6J#`vHK7w4(ndna z?!F)U?vbk;vT zybKYI1Hd}~FeZd}!*QI^bUK|G9UXOQHG?${l!-*57XUtrh^rU`0OSB5Ktv)U#p@uV zAR=B<0)WQgi0C8{{VA17y~5+G*{cdD9*=JjLOeu7ix82GCd)l%ugEpw7_v_1Q#C7X2+_{0RRC2qf*KTj~_oi5gvaTptiQQNGulHfrxhifLbPm@s3iyKQCrD zGOt6FFWUBp8l@B-T?#1!5vGGcZOmi_&k+S2*%cn4lsY;+J-szd-(`T}@i@oK133Wa zi-yts6~nmU55E8IPRBVN2~oi`?X~Up9$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#lY@1j76Iwk!3t)uj`(E$@AU~2X7Qn zJZIY-ONFrVS$c`S@lb4NN~s4^snlOD1H>=g-Q8aYfNz$Qfcd~!I6r3?3%^kS)bBWB zzxMs9@M(iV-+*X5W?5~;*5$D0O+I$%;J_9BxnwfgA6EQ1JDr`KhG7_w3L!RB3h?5D z`GD9%T&w0Ee~PUO)3;Je^99$P*yXz8I?=1H>ux`F>eQSDUZGQK*REY01VK#)MK*M& zu3z`1NF;yz@e9`-XBjAW9tu+S2{{>7D9ZIh$=R2 zoOMn?E=+*3?FAdsEjN;x(;IhnqiE4}{%RthGQ^xH-o P00000NkvXXu0mjf(Sr;G literal 0 HcmV?d00001 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 584af597c..dfea3feca 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1429,4 +1429,7 @@ Limited ride And limited avatar frame Successfully opened You have purchased the BattlePass 評論 + 查看信息 + 取消靜音 + 靜音 diff --git a/live/src/main/AndroidManifest.xml b/live/src/main/AndroidManifest.xml index dd65fbe2a..8aa914b19 100644 --- a/live/src/main/AndroidManifest.xml +++ b/live/src/main/AndroidManifest.xml @@ -84,6 +84,9 @@ + diff --git a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java similarity index 61% rename from common/src/main/java/com/yunbao/common/activity/SudGameActivity.java rename to live/src/main/java/com/yunbao/live/activity/SudGameActivity.java index f059a0103..c0cff3132 100644 --- a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java @@ -1,6 +1,10 @@ -package com.yunbao.common.activity; +package com.yunbao.live.activity; +import android.Manifest; import android.app.Activity; +import android.os.Bundle; +import android.os.Handler; +import android.text.TextUtils; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; @@ -10,19 +14,25 @@ import androidx.lifecycle.Observer; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.alibaba.android.arouter.facade.annotation.Route; import com.google.gson.Gson; import com.lxj.xpopup.XPopup; +import com.yunbao.common.Constants; import com.yunbao.common.R; +import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.adapter.SudGameChatAdapter; import com.yunbao.common.adapter.SudGameUserListAdapter; import com.yunbao.common.bean.CheckRemainingBalance; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.CustomSidebarChildModel; import com.yunbao.common.bean.CustomSidebarInfoModel; +import com.yunbao.common.bean.HttpCallbackModel; import com.yunbao.common.bean.SudGameChatImModel; +import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.dialog.SudGameInputPopupWindow; import com.yunbao.common.event.CheckRemainingBalanceEvent; import com.yunbao.common.event.SudGameSocketImEvent; +import com.yunbao.common.event.SudGameUserEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; @@ -34,11 +44,16 @@ import com.yunbao.common.sud.model.GameViewInfoModel; import com.yunbao.common.sud.state.SudMGPMGState; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.ProcessResultUtil; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.LiveSudGameHistoryPopup; import com.yunbao.common.views.TopGradual; import com.yunbao.common.views.weight.ViewClicksAntiShake; +import com.yunbao.live.dialog.LiveUserDialogFragment; +import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -51,7 +66,7 @@ import cn.rongcloud.rtc.api.RCRTCRemoteUser; import cn.rongcloud.rtc.api.RCRTCRoom; import cn.rongcloud.rtc.api.stream.RCRTCInputStream; import cn.rongcloud.rtc.base.RTCErrorCode; - +@Route(path = RouteUtil.PATH_SudGameActivity) public class SudGameActivity extends AbsActivity implements GameMicManager.MeetingCallback { private FrameLayout gameContainer; private long mInteractionID; @@ -67,6 +82,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti private RecyclerView chatList, userList; private SudGameChatAdapter mLiveChatAdapter; private SudGameUserListAdapter sudGameUserListAdapter; + private ProcessResultUtil mProcessResultUtil; @Override protected int getLayoutId() { @@ -84,6 +100,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti private List customSidebarChildModels = new ArrayList<>(); private void initDate() { + LiveNetManager.get(mContext) .getCustomSidebarInfo("1", new HttpCallback>() { @Override @@ -109,10 +126,51 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); gameCloseWheat.setVisibility(View.INVISIBLE); + LiveNetManager.get(mContext).getRoomMicData(mLiveUid, new HttpCallback>() { + @Override + public void onSuccess(List data) { + gameMicManager.refreshStreams(data); + sudGameUserListAdapter.refreshSudGameUserList(data); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + if (!mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { + ToastUtil.show("拒绝权限将无法使用上麦功能"); + mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { + @Override + public void run() { + + } + }); + } + } + }, 1500); + mProcessResultUtil = new ProcessResultUtil(this); + + } @Override protected void onDestroy() { + LiveNetManager.get(mContext) + .leaveMic(mLiveUid, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); Bus.getOff(this); gameMicManager.leaveRoom(); gameMicManager.detachView(); @@ -120,6 +178,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } private void initView() { + String createSudRoomJson = getIntent().getStringExtra("CreateSudRoom"); mCreateSudRoomModel = new Gson().fromJson(createSudRoomJson, CreateSudRoomModel.class); mInteractionID = mCreateSudRoomModel.getLongSudGameId(); @@ -148,6 +207,38 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti mLiveChatAdapter = new SudGameChatAdapter(mContext); chatList.setAdapter(mLiveChatAdapter); sudGameUserListAdapter = new SudGameUserListAdapter(new ArrayList<>()); + sudGameUserListAdapter.setSudGameSmallCallBack(new SudGameUserListAdapter.SudGameSmallCallBack() { + @Override + public void unMute(String userID, int position) { + if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), userID)) { + gameMicManager.refreshStreams(userID, false, position); + } else { + ToastUtil.show(WordUtil.isNewZh() ? "無法對本人靜音" : "Unable to mute myself"); + } + + } + + @Override + public void mute(String userID, int position) { + if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), userID)) { + gameMicManager.refreshStreams(userID, true, position); + } else { + ToastUtil.show(WordUtil.isNewZh() ? "無法對本人靜音" : "Unable to mute myself"); + } + + } + + @Override + public void viewInformation(SudGameUserModel sudGameUserModel) { + LiveUserDialogFragment fragment = new LiveUserDialogFragment(); + Bundle bundle = new Bundle(); + bundle.putString(Constants.LIVE_UID, "uid"); + bundle.putString(Constants.STREAM, ""); + bundle.putString(Constants.TO_UID, sudGameUserModel.getId() + ""); + fragment.setArguments(bundle); + fragment.show(((SudGameActivity) mContext).getSupportFragmentManager(), "LiveUserDialogFragment"); + } + }); userList.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false)); userList.setAdapter(sudGameUserListAdapter); if (mCreateSudRoomModel != null) { @@ -173,32 +264,82 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_seat), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - if (publishDefault) { - disable = true; - // 设置禁用麦克风采集 - RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); - ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); - gameMicManager.unPublishStreams(); + if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { + if (publishDefault) { + disable = true; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + gameMicManager.unPublishStreams(); + } else { + if (sudGameUserListAdapter.isMicMax()) { + ToastUtil.show(WordUtil.isNewZh() ? "上麥人數最大7人" : "The maximum number of people on the microphone is 7"); + } else { + gameMicManager.publishDefaultAVStream(); + } + + } } else { - gameMicManager.publishDefaultAVStream(); + mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { + @Override + public void run() { + + } + }); } + } }); ViewClicksAntiShake.clicksAntiShake(gameCloseWheat, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - if (disable) { - disable = false; - // 设置禁用麦克风采集 - RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); - ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat); + if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { + if (disable) { + disable = false; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat); + LiveNetManager.get(mContext) + .onMic(mLiveUid, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); + } else { + disable = true; + // 设置禁用麦克风采集 + RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); + ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + LiveNetManager.get(mContext) + .offMic(mLiveUid, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); + } + } else { - disable = true; - // 设置禁用麦克风采集 - RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); - ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); + mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { + @Override + public void run() { + + } + }); } + } }); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_review_input), new ViewClicksAntiShake.ViewClicksCallBack() { @@ -327,7 +468,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti public void onJoinRoomSuccess(RCRTCRoom rcrtcRoom) { // 主动订阅远端用户发布的资源 - gameMicManager.subscribeAVStream(); +// gameMicManager.subscribeAVStream(); } @Override @@ -350,16 +491,28 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } }); + LiveNetManager.get(mContext) + .joinMic(mLiveUid, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); } @Override public void onPublishFailed() { - ToastUtil.show("发布失败 "); + ToastUtil.show(WordUtil.isNewZh() ? "語音加入失敗" : "Voice joining failed"); } @Override public void onSubscribeSuccess(List inputStreamList) { - ToastUtil.show("订阅成功 "); +// ToastUtil.show("订阅成功 "); } @Override @@ -367,6 +520,22 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti ToastUtil.show("订阅失败 "); } + @Override + public void onSubscribeSuccess(String userID, boolean mute, int position) { + runOnUiThread(new Runnable() { + @Override + public void run() { + sudGameUserListAdapter.muteUser(userID, mute, position); + } + }); + + } + + @Override + public void onSubscribeFailed(String userID) { + ToastUtil.show("订阅失败 "); + } + @Override public void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser) { @@ -382,6 +551,11 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti mLiveChatAdapter.insertItem(sudGameChatImModel); } + @Override + public void refreshSudGameUserList(List personList) { + sudGameUserListAdapter.refreshSudGameUserList(personList); + } + @Override public void onUnPublishStreamsSuccess() { runOnUiThread(new Runnable() { @@ -392,6 +566,18 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti gameCloseWheat.setVisibility(View.INVISIBLE); } }); + LiveNetManager.get(mContext) + .leaveMic(mLiveUid, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); } @@ -404,4 +590,31 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti public void onSudGameSocketImEvent(SudGameSocketImEvent event) { gameMicManager.processingMessage(event); } + + @Subscribe(threadMode = ThreadMode.MAIN) + public void onSudGameUserModel(SudGameUserModel model) { + if (model.isNullUser()) { + if (!publishDefault) { + if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { + if (sudGameUserListAdapter.isMicMax()) { + ToastUtil.show(WordUtil.isNewZh() ? "上麥人數最大7人" : "The maximum number of people on the microphone is 7"); + } else { + gameMicManager.publishDefaultAVStream(); + } + + } else { + mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { + @Override + public void run() { + + } + }); + } + + } else { + ToastUtil.show(WordUtil.isNewZh() ? "已經是上麥狀態" : "It is already in the wheat state"); + } + + } + } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 800802944..8c1c4ed6f 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -554,6 +554,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.ai_te), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + if (TextUtils.equals(mLiveUid, "uid")) return; if (!TextUtils.isEmpty(mUserBean.getId()) && !TextUtils.isEmpty(mUserBean.getUserNiceName())) { Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.INPUT_DIALOG) @@ -630,7 +631,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 跳转到个人主页 */ private void forwardHomePage() { - + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); Constants.mStream = mStream; RouteUtil.forwardUserHome(mContext, mToUid, true, mLiveUid, 0); @@ -640,11 +641,13 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 举报 */ private void report() { + if (TextUtils.equals(mLiveUid, "uid")) return; LiveReportActivity.forward(mContext, mToUid); } private void gotoLive(String live_id) { + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.party_studio), new DialogUitl.SimpleCallback() { @Override @@ -698,6 +701,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On } setAttention(); } else if (i == R.id.btn_home_page) { + if (TextUtils.equals(mLiveUid, "uid")) return; if (isAnchor) { MobclickAgent.onEvent(mContext, "anchor_avatar_index", "点主播主页"); } else { @@ -705,18 +709,22 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On } forwardHomePage(); } else if (i == R.id.btn_report) { + if (TextUtils.equals(mLiveUid, "uid")) return; report(); } else if (i == R.id.avatar) { + if (TextUtils.equals(mLiveUid, "uid")) return; if (isAnchor) { MobclickAgent.onEvent(mContext, "anchor_avatar_btn", "点主播头像"); } forwardHomePage(); } else if (i == R.id.btn_guard) { + if (TextUtils.equals(mLiveUid, "uid")) return; MobclickAgent.onEvent(mContext, "anchor_avatar_guard", "守护按钮"); ((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity, mToUid); } else if (i == R.id.btn_live) { gotoLive(mToUid); } else if (i == R.id.noble_icon_layout) { + if (TextUtils.equals(mLiveUid, "uid")) return; if (isAnchor) { dismiss(); ((LiveActivity) mContext).openFansWindow(mToUid); @@ -726,6 +734,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On .setType(LiveAudienceEvent.LiveAudienceType.NOBLE)); } } else if (i == R.id.btn_setting) { + if (TextUtils.equals(mLiveUid, "uid")) return; setting(); } } @@ -782,6 +791,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On private DialogUitl.StringArrayDialogCallback mArrayDialogCallback = new DialogUitl.StringArrayDialogCallback() { @Override public void onItemClick(String text, int tag) { + if (TextUtils.equals(mLiveUid, "uid")) return; if (tag == R.string.live_setting_kick) { kick(); @@ -815,6 +825,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 查看管理员列表 */ private void adminList() { + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); ((LiveActivity) mContext).openAdminListWindow(); } @@ -823,6 +834,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 踢人 */ private void kick() { + if (TextUtils.equals(mLiveUid, "uid")) return; LiveHttpUtil.kicking(mLiveUid, mToUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -839,6 +851,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 永久禁言->改成三天禁言 */ private void setShutUp() { + if (TextUtils.equals(mLiveUid, "uid")) return; LiveHttpUtil.setShutUp(mLiveUid, "0", 0, mToUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -855,6 +868,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 本场禁言 */ private void setShutUp2() { + if (TextUtils.equals(mLiveUid, "uid")) return; LiveHttpUtil.setShutUp(mLiveUid, mStream, 1, mToUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -872,6 +886,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 设置或取消管理员 */ private void setAdmin() { + if (TextUtils.equals(mLiveUid, "uid")) return; LiveHttpUtil.setAdmin(mLiveUid, mToUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -893,6 +908,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 超管关闭直播间 */ private void closeLive() { + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); LiveHttpUtil.superCloseRoom(mLiveUid, 0, mSuperCloseRoomCallback); } @@ -901,11 +917,13 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 超管关闭直播间并禁止主播直播 */ private void closeLive2() { + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); LiveHttpUtil.superCloseRoom(mLiveUid, 1, mSuperCloseRoomCallback); } private void setShutUp3() { + if (TextUtils.equals(mLiveUid, "uid")) return; new LiveSettingSilenceDialog(mContext) .setItemClickListener((bean, position) -> { LiveHttpUtil.setShutUp(mLiveUid, mStream, 1, mToUid, bean + "", new HttpCallback() { @@ -927,6 +945,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On * 超管关闭直播间并禁用主播账户 */ private void forbidAccount() { + if (TextUtils.equals(mLiveUid, "uid")) return; dismiss(); LiveHttpUtil.superCloseRoom(mLiveUid, 2, mSuperCloseRoomCallback); } 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 2f1f5ce7d..eaa40cc4e 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -74,6 +74,7 @@ import com.yunbao.common.event.MainHomeCommunityToChatEvent; import com.yunbao.common.event.MessageIMEvent; import com.yunbao.common.event.NoviceInstructorEvent; import com.yunbao.common.event.RongIMConnectionStatusEvent; +import com.yunbao.common.event.SudGameUserEvent; import com.yunbao.common.event.UpdateTablePointMe; import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; @@ -103,7 +104,9 @@ import com.yunbao.common.views.APKUpdateCustomPopup; import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.weight.LiveFloatView; +import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveAudienceActivity; +import com.yunbao.live.dialog.LiveUserDialogFragment; import com.yunbao.live.utils.LiveStorge; import com.yunbao.main.R; import com.yunbao.main.adapter.FullAdToBannerTransition; @@ -1426,6 +1429,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene findViewById(R.id.banner_click).setVisibility(View.VISIBLE); } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onSudGameUserEvent(SudGameUserEvent event) { + + } + @Subscribe(threadMode = ThreadMode.MAIN) public void onLiveFloatEvent(LiveFloatEvent event) { if (event != null && event.getmLiveBean() != null && !TextUtils.isEmpty(event.getmLiveBean().getPull())) { @@ -1444,5 +1452,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene MobclickAgent.onEvent(mContext, "home_page_to_redpk", "首页点击右下角去红包专区"); mainHomeViewHolder.setCurPosition(3); }); + } + + } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java index 11bf76eb6..97345b408 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java @@ -17,7 +17,7 @@ import com.google.gson.Gson; import com.lxj.xpopup.XPopup; import com.lxj.xpopup.enums.PopupPosition; import com.yunbao.common.activity.AbsActivity; -import com.yunbao.common.activity.SudGameActivity; +import com.yunbao.live.activity.SudGameActivity; import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.adapter.SudGameListAdapter; import com.yunbao.common.bean.CreateSudRoomModel; From 5ca13b770c1314d188ea9c0e0631b42b3cff1da4 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 12 Jan 2024 09:34:29 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=88=BFbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/SudGameUserListAdapter.java | 18 ++++++-- .../yunbao/common/bean/SudGameUserModel.java | 11 +++++ .../dialog/SudGameInputPopupWindow.java | 12 +++++- .../dialog/SudGameSmallPopupPindow.java | 6 +++ .../manager/imrongcloud/GameMicManager.java | 1 + .../views/SudGameUserListViewHolder.java | 23 +++++++++-- .../layout/view_sud_game_user_list_holder.xml | 1 + .../res/mipmap-b+en+us/icon_game_hang_up.png | Bin 0 -> 8040 bytes .../res/mipmap-b+en+us/icon_game_seat.png | Bin 0 -> 6666 bytes common/src/main/res/values-en-rUS/string.xml | 4 ++ common/src/main/res/values-zh-rHK/strings.xml | 4 ++ common/src/main/res/values-zh-rTW/strings.xml | 4 ++ common/src/main/res/values-zh/strings.xml | 4 ++ common/src/main/res/values/strings.xml | 10 ++--- .../yunbao/live/activity/SudGameActivity.java | 39 +++++++++++------- 15 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 common/src/main/res/mipmap-b+en+us/icon_game_hang_up.png create mode 100644 common/src/main/res/mipmap-b+en+us/icon_game_seat.png diff --git a/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java index f20aeea94..e8893b9f1 100644 --- a/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java @@ -43,12 +43,18 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { } - public void refreshSudGameUserList(List gameUserModels) { + public void refreshSudGameUserList(List gameUserModels, List muteUser) { this.gameUserModels.clear(); if (gameUserModels.size() < 7) { micMax = false; this.gameUserModels.addAll(gameUserModels); for (int i = 0; i < this.gameUserModels.size(); i++) { + for (String userID : muteUser) { + if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) { + this.gameUserModels.get(i).setMute(true); + } + + } this.gameUserModels.get(i).setNullUser(false); } int size = 7 - gameUserModels.size(); @@ -65,6 +71,12 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { micMax = true; for (int i = 0; i < 7; i++) { + for (String userID : muteUser) { + if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) { + this.gameUserModels.get(i).setMute(true); + } + + } this.gameUserModels.add(gameUserModels.get(i).setNullUser(false)); } } @@ -81,7 +93,7 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { SudGameUserListViewHolder sudGameUserListViewHolder = (SudGameUserListViewHolder) holder; - sudGameUserListViewHolder.upData(gameUserModels.get(position), sudGameSmallCallBack,position); + sudGameUserListViewHolder.upData(gameUserModels.get(position), sudGameSmallCallBack, position); } @Override @@ -98,7 +110,7 @@ public class SudGameUserListAdapter extends RecyclerView.Adapter { SudGameUserModel sudGameUserModel = gameUserModels.get(i); if (!sudGameUserModel.isNullUser()) { if (TextUtils.equals(userID, String.valueOf(sudGameUserModel.getId()))) { - gameUserModels.get(i).setMicStatus(mute ? 1 : 3); + gameUserModels.get(i).setMute(mute); } } diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java index 2a55fac19..a614ee9d7 100644 --- a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java @@ -15,6 +15,17 @@ public class SudGameUserModel extends BaseModel { @SerializedName("mic_status") private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风 + private boolean mute = false; + + public boolean isMute() { + return mute; + } + + public SudGameUserModel setMute(boolean mute) { + this.mute = mute; + return this; + } + public boolean isNullUser() { return nullUser; } diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java index 6cac0cc25..08c1f08d5 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameInputPopupWindow.java @@ -1,7 +1,10 @@ package com.yunbao.common.dialog; +import static android.content.Context.INPUT_METHOD_SERVICE; + import android.content.Context; import android.text.TextUtils; +import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import androidx.annotation.NonNull; @@ -18,7 +21,7 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; public class SudGameInputPopupWindow extends BottomPopupView { private EditText textMessage; private SudGameInputCallBack sudGameInputCallBack; - + private InputMethodManager imm; public SudGameInputPopupWindow(@NonNull Context context, SudGameInputCallBack sudGameInputCallBack) { super(context); this.sudGameInputCallBack = sudGameInputCallBack; @@ -40,6 +43,7 @@ public class SudGameInputPopupWindow extends BottomPopupView { } private void initView() { + imm = (InputMethodManager) getContext().getSystemService(INPUT_METHOD_SERVICE); textMessage = findViewById(R.id.text_message); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.send), new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -60,7 +64,11 @@ public class SudGameInputPopupWindow extends BottomPopupView { } } }); - + textMessage.postDelayed(() -> { + //软键盘弹出 + imm.showSoftInput(textMessage, InputMethodManager.SHOW_FORCED); + textMessage.requestFocus(); + }, 200); } private void initDate() { diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java b/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java index 089e34caa..5c2d527d8 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameSmallPopupPindow.java @@ -1,6 +1,7 @@ package com.yunbao.common.dialog; import android.content.Context; +import android.text.TextUtils; import android.widget.TextView; import androidx.annotation.NonNull; @@ -8,6 +9,7 @@ import androidx.annotation.NonNull; import com.lxj.xpopup.core.AttachPopupView; import com.yunbao.common.R; import com.yunbao.common.bean.SudGameUserModel; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -41,6 +43,10 @@ public class SudGameSmallPopupPindow extends AttachPopupView { ViewClicksAntiShake.clicksAntiShake(viewUnMute, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + if (TextUtils.equals(String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getId()), String.valueOf(sudGameUserModel.getId()))) { + ToastUtil.show(WordUtil.isNewZh() ? "無法對本人靜音" : "Unable to mute myself"); + return; + } if (sudGameUserModel.getMicStatus() == 3) { ToastUtil.show("对方未开麦!"); return; diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java index 357197f1a..efd2497e3 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameMicManager.java @@ -181,6 +181,7 @@ public class GameMicManager { public void refreshStreams(List personList) { + final List inputStreams = new ArrayList<>(); for (SudGameUserModel sudGameUserModel : personList) { diff --git a/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java index 6dce6f6ef..98ba77a66 100644 --- a/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/SudGameUserListViewHolder.java @@ -1,8 +1,11 @@ package com.yunbao.common.views; +import android.app.Activity; import android.view.View; +import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; +import android.widget.LinearLayout; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; @@ -16,12 +19,14 @@ import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.dialog.SudGameSmallPopupPindow; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.views.weight.ViewClicksAntiShake; public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { private ImageView vacancy_sud_game, mic_status; private FrameLayout user_layout; private RoundedImageView sud_game_user; + private LinearLayout layout; public SudGameUserListViewHolder(@NonNull View itemView) { super(itemView); @@ -29,9 +34,18 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { sud_game_user = itemView.findViewById(R.id.sud_game_user); user_layout = itemView.findViewById(R.id.user_layout); mic_status = itemView.findViewById(R.id.mic_status); + layout = itemView.findViewById(R.id.layout); } public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) { +// layout.post(new Runnable() { +// @Override +// public void run() { +// RecyclerView.LayoutParams params = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); +// params.width = DeviceUtils.getScreenWidth((Activity) itemView.getContext()) / 7; +// layout.setLayoutParams(params); +// } +// }); if (sudGameUserModel.isNullUser()) { vacancy_sud_game.setVisibility(View.VISIBLE); user_layout.setVisibility(View.GONE); @@ -49,7 +63,8 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_open_wheat, mic_status); } else if (sudGameUserModel.getMicStatus() == 3) { ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat, mic_status); - } else if (sudGameUserModel.getMicStatus() == 1) { + } + if (sudGameUserModel.isMute()) { ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat_mute, mic_status); } ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -62,16 +77,16 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder { .popupPosition(PopupPosition.Bottom) .asCustom(new SudGameSmallPopupPindow(itemView.getContext(), sudGameUserModel, - sudGameUserModel.getMicStatus() == 1, + sudGameUserModel.isMute(), new SudGameSmallPopupPindow.SudGameSmallCallBack() { @Override public void unMute() { - sudGameSmallCallBack.unMute(sudGameUserModel.getId() + "",position); + sudGameSmallCallBack.unMute(sudGameUserModel.getId() + "", position); } @Override public void mute() { - sudGameSmallCallBack.mute(sudGameUserModel.getId() + "",position); + sudGameSmallCallBack.mute(sudGameUserModel.getId() + "", position); } @Override diff --git a/common/src/main/res/layout/view_sud_game_user_list_holder.xml b/common/src/main/res/layout/view_sud_game_user_list_holder.xml index 4f6049b06..2d86b7c83 100644 --- a/common/src/main/res/layout/view_sud_game_user_list_holder.xml +++ b/common/src/main/res/layout/view_sud_game_user_list_holder.xml @@ -1,5 +1,6 @@ Py9B1uF+RCr$Hoe7v!)s@G8w|ZY#+GZ1ElYQxCM?e!3;|?QkAv!^w(TPz>Aa0px zGKv|KI3_G%B$`ZO#%N45QPc!UtGKoxo5&`hvI+{yPSf=MhV$;bU9VriSMODIfqdW8 z_w`3nb>Cgi|D69l_uO-DDNf>-wT^6R$fuq>a>%EKkz_C!i&7M)0R<=uuqY%(8!SL^ z062oh5n}egJBYCwi#5OsGN>evqf}C<22pde4qu&Y9kZ6ulNcq$=#OG34fgxKv?iN6 zpaG}{8wB%mzn2lkoG;A#3_$)efkV^~VD6}XPSIuq| zbExB&Y6wS;7eL1i80&4uQ_n-h=#Dz3XUS-Gs=|&UT<=^J^%>JAO>Y)4wvxejR6kxk z9^j-M80$51?TI~;IZgbTWCf5)`DDOP)tN9fC(p~esLp1C->5!RrxT#G0%N_w02DLH z<3g$;tUtmm!~Om7_SS;tvM>cHuwCp0#F(ZA@?pBbNgFWM8w|tZWnvWjE(lMAHiro@ zks}f2WCSUZj7vuv_5kOrL99#%IB5aKTFCk2P}U?=;;p$QLQCb@WE3IHa)a7;gDGXQ zZE8DT4dmsPg41GPtc84+7{BxcJ^Vu`sR-CRLT?@EaEHBhgteL2x+I$SZ8ezRwgj9O z0b{+w3}W2Y*ny~mPez+lous4o#m`z=LTl2l{55c|D&@zif|D{Z)7cTfT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NgzlmloMTa*7Mp4|&HEk!XQHz?i|n6vhzY#ZV!17_A9Y$1lTzXj(iW z^rwMWs~_@`Ur+*>GJB)OslDVN7Kb zipP;BqWIMUzvaUCig+fe=CsbBoJs0>qG#4av9*e|4AqM91j9(L*GOI6Qn7V;Qp%`ha6gVo2*P$`Rd~E!yq|v0}DH?vl>FRR2VcT^IiyuKS zoi2M(j8fO1MURcI@HvmroJ^*W$=He$YF-R-{vJk)y!r^kY`@7%eT~&T6nCoYiEdy{ zR$r#hefB_fH6lugIb(qqNq6; z)UVi_6OSp0Oi~y|`Y~}qv`(KWK7e968B9|@#&*U%EClZLsuh?D-!qk_lrfcD#+eh+ zMD{zZ^ao*Z&`hzE*ZHm&PG6LDhq{FWsfD3xYc&E)1wd2ihQV|cJt}s4CYOV%q^LSH zN*{WXyG=eMjfv_eHdHqtZc1KLeM%y9!0EGBKcJjz$)>Jp;u1Zm&W}k7t7%TE#azjJ zq!4*drJTulUft?HE1W7O)~LqV2W_7HtVKNxh5|n)o8IOTi;AaoMN5a#gfM1J0Fif* zx#si)B`o6*->3&%FLOy1|KqlE#(=33#XUp|vYCv*SR&^3+ie04KOj)QxPn@KpJ0~M?!KaA(wP|0bMZY zYCbU?@=(z?6h!MCL2(?z)B*`- The quantity of goods exchanged has reached the upper limit Successfully opened You have purchased the BattlePass + Comment + See Information + Unmute + Mute diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 315906b80..55086a50c 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1423,4 +1423,8 @@ 商品兌換數量已達到上限 開通成功 您已購買該戰令 + 評論 + 查看信息 + 取消靜音 + 靜音 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index b8d60456c..3aa31fb72 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1422,4 +1422,8 @@ 商品兌換數量已達到上限 開通成功 您已購買該戰令 + 評論 + 查看信息 + 取消靜音 + 靜音 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index da10bc513..a4f2e870a 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1421,4 +1421,8 @@ 商品兌換數量已達到上限 開通成功 您已購買該戰令 + 評論 + 查看信息 + 取消靜音 + 靜音 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index dfea3feca..a1ea01a49 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -666,7 +666,7 @@ ReceiveAwards One free gift privilege! - Send out + Send I am sorry video myname.pdlive.shayu.fileprovider @@ -1428,8 +1428,8 @@ Limited ride And limited avatar frame The quantity of goods exchanged has reached the upper limit Successfully opened You have purchased the BattlePass - 評論 - 查看信息 - 取消靜音 - 靜音 + Comment + See Information + Unmute + Mute diff --git a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java index c0cff3132..5ffbe0506 100644 --- a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java @@ -32,7 +32,6 @@ import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.dialog.SudGameInputPopupWindow; import com.yunbao.common.event.CheckRemainingBalanceEvent; import com.yunbao.common.event.SudGameSocketImEvent; -import com.yunbao.common.event.SudGameUserEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; @@ -53,7 +52,6 @@ import com.yunbao.common.views.TopGradual; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.dialog.LiveUserDialogFragment; -import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -66,6 +64,7 @@ import cn.rongcloud.rtc.api.RCRTCRemoteUser; import cn.rongcloud.rtc.api.RCRTCRoom; import cn.rongcloud.rtc.api.stream.RCRTCInputStream; import cn.rongcloud.rtc.base.RTCErrorCode; + @Route(path = RouteUtil.PATH_SudGameActivity) public class SudGameActivity extends AbsActivity implements GameMicManager.MeetingCallback { private FrameLayout gameContainer; @@ -83,6 +82,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti private SudGameChatAdapter mLiveChatAdapter; private SudGameUserListAdapter sudGameUserListAdapter; private ProcessResultUtil mProcessResultUtil; + private List muteUser = new ArrayList<>(); @Override protected int getLayoutId() { @@ -126,18 +126,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat); gameCloseWheat.setVisibility(View.INVISIBLE); - LiveNetManager.get(mContext).getRoomMicData(mLiveUid, new HttpCallback>() { - @Override - public void onSuccess(List data) { - gameMicManager.refreshStreams(data); - sudGameUserListAdapter.refreshSudGameUserList(data); - } - @Override - public void onError(String error) { - ToastUtil.show(error); - } - }); new Handler().postDelayed(new Runnable() { @Override public void run() { @@ -215,11 +204,12 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } else { ToastUtil.show(WordUtil.isNewZh() ? "無法對本人靜音" : "Unable to mute myself"); } - + muteUser.remove(userID); } @Override public void mute(String userID, int position) { + muteUser.add(userID); if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), userID)) { gameMicManager.refreshStreams(userID, true, position); } else { @@ -245,6 +235,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti roomName.setText(mCreateSudRoomModel.getRoomName()); roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId()); } + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { @@ -312,6 +303,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } }); + ToastUtil.show(WordUtil.isNewZh() ? "麥克風已開啟" : "Microphone turned on"); } else { disable = true; // 设置禁用麦克风采集 @@ -329,6 +321,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } }); + ToastUtil.show(WordUtil.isNewZh() ? "麥克風已關閉" : "Microphone turned off"); } } else { @@ -466,7 +459,18 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti @Override public void onJoinRoomSuccess(RCRTCRoom rcrtcRoom) { + LiveNetManager.get(mContext).getRoomMicData(mLiveUid, new HttpCallback>() { + @Override + public void onSuccess(List data) { + gameMicManager.refreshStreams(data); + sudGameUserListAdapter.refreshSudGameUserList(data, muteUser); + } + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); // 主动订阅远端用户发布的资源 // gameMicManager.subscribeAVStream(); } @@ -525,6 +529,11 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti runOnUiThread(new Runnable() { @Override public void run() { + if (mute) { + ToastUtil.show(WordUtil.isNewZh() ? "已靜音該用戶" : "The user has been muted"); + } else { + ToastUtil.show(WordUtil.isNewZh() ? "已取消該用戶靜音" : "The user has been unmuted"); + } sudGameUserListAdapter.muteUser(userID, mute, position); } }); @@ -553,7 +562,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti @Override public void refreshSudGameUserList(List personList) { - sudGameUserListAdapter.refreshSudGameUserList(personList); + sudGameUserListAdapter.refreshSudGameUserList(personList, muteUser); } @Override From cf749d85c6a2b855c12ce4f7503fb1e3e4aca410 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 12 Jan 2024 15:16:40 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=88=BFbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bean/CheckRemainingBalance.java | 9 +++++++++ .../src/main/res/layout/activity_sud_game.xml | 19 ++++++++++++------ .../main/res/layout/dialog_sud_game_input.xml | 7 ++++--- .../icon_game_hang_up_en.png} | Bin .../icon_game_seat_en.png} | Bin common/src/main/res/values-en-rUS/string.xml | 4 ++-- common/src/main/res/values/strings.xml | 2 +- .../yunbao/live/activity/SudGameActivity.java | 10 ++++++--- 8 files changed, 36 insertions(+), 15 deletions(-) rename common/src/main/res/{mipmap-b+en+us/icon_game_hang_up.png => mipmap-xxhdpi/icon_game_hang_up_en.png} (100%) rename common/src/main/res/{mipmap-b+en+us/icon_game_seat.png => mipmap-xxhdpi/icon_game_seat_en.png} (100%) diff --git a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java index 611c289ef..49d49043a 100644 --- a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java +++ b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java @@ -36,4 +36,13 @@ public class CheckRemainingBalance extends BaseModel { public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) { this.goldenBeanRemainingBalance = goldenBeanRemainingBalance; } + + @Override + public String toString() { + return "CheckRemainingBalance{" + + "goldenBeanRemainingBalance=" + goldenBeanRemainingBalance + + ", status=" + status + + ", deductMoneyKey='" + deductMoneyKey + '\'' + + '}'; + } } diff --git a/common/src/main/res/layout/activity_sud_game.xml b/common/src/main/res/layout/activity_sud_game.xml index ddf4fbc31..e358ac494 100644 --- a/common/src/main/res/layout/activity_sud_game.xml +++ b/common/src/main/res/layout/activity_sud_game.xml @@ -21,7 +21,7 @@ android:layout_width="150dp" android:layout_height="50dp" android:layout_marginStart="23dp" - android:layout_marginTop="45dp" + android:layout_marginTop="25dp" android:background="@drawable/bg_live_sud_game_top_new" android:gravity="center"> @@ -72,7 +72,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end" - android:layout_marginTop="49dp" + android:layout_marginTop="29dp" android:layout_marginEnd="20dp" android:gravity="center_vertical"> @@ -146,10 +146,17 @@ android:layout_gravity="bottom" android:layout_marginBottom="75dp" /> - + android:layout_marginTop="80dp" + android:gravity="center"> + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_sud_game_input.xml b/common/src/main/res/layout/dialog_sud_game_input.xml index 32515abd5..68236956b 100644 --- a/common/src/main/res/layout/dialog_sud_game_input.xml +++ b/common/src/main/res/layout/dialog_sud_game_input.xml @@ -6,13 +6,14 @@ ReceiveAwards One free gift privilege! - Send out + Send I am sorry video myname.pdlive.shayu.fileprovider @@ -1427,7 +1427,7 @@ Limited ride And limited avatar frame Successfully opened You have purchased the BattlePass Comment - See Information + Information Unmute Mute diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index a1ea01a49..9062827a9 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1429,7 +1429,7 @@ Limited ride And limited avatar frame Successfully opened You have purchased the BattlePass Comment - See Information + Information Unmute Mute diff --git a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java index 5ffbe0506..6e2189d71 100644 --- a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java @@ -196,6 +196,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti mLiveChatAdapter = new SudGameChatAdapter(mContext); chatList.setAdapter(mLiveChatAdapter); sudGameUserListAdapter = new SudGameUserListAdapter(new ArrayList<>()); + ImgLoader.display(mContext, WordUtil.isNewZh() ? R.mipmap.icon_game_seat : R.mipmap.icon_game_seat_en, gameSeat); sudGameUserListAdapter.setSudGameSmallCallBack(new SudGameUserListAdapter.SudGameSmallCallBack() { @Override public void unMute(String userID, int position) { @@ -405,7 +406,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback() { @Override public void onSuccess(CheckRemainingBalance data) { - if (data.getGoldenBeanRemainingBalance() == 1) { + if (TextUtils.equals(String.valueOf(data.getGoldenBeanRemainingBalance() ),"1")) { gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); } else { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { @@ -415,6 +416,8 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } } +// ToastUtil.show(data.toString()); + } @Override @@ -424,6 +427,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti } else { ToastUtil.show("Shortage of money"); } + } }); break; @@ -485,7 +489,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti runOnUiThread(new Runnable() { @Override public void run() { - ImgLoader.display(mContext, R.mipmap.icon_game_hang_up, gameSeat); + ImgLoader.display(mContext, WordUtil.isNewZh() ? R.mipmap.icon_game_hang_up : R.mipmap.icon_game_hang_up_en, gameSeat); publishDefault = true; gameCloseWheat.setVisibility(View.VISIBLE); disable = false; @@ -570,7 +574,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti runOnUiThread(new Runnable() { @Override public void run() { - ImgLoader.display(mContext, R.mipmap.icon_game_seat, gameSeat); + ImgLoader.display(mContext, WordUtil.isNewZh() ? R.mipmap.icon_game_seat : R.mipmap.icon_game_seat_en, gameSeat); publishDefault = false; gameCloseWheat.setVisibility(View.INVISIBLE); } From f22f8fcb4beb90c2b1c32b78a4e240d0cd98fcae Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 15 Jan 2024 10:01:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=88=BFbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/yunbao/live/activity/SudGameActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java index 6e2189d71..9c9f5d7ea 100644 --- a/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudGameActivity.java @@ -481,7 +481,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti @Override public void onJoinRoomFailed(RTCErrorCode rtcErrorCode) { - ToastUtil.show("加入失败 "); + ToastUtil.show("加入失败 "+rtcErrorCode.toString()); } @Override