上麦改为默认闭麦
This commit is contained in:
@@ -229,9 +229,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
@CallSuper
|
||||
override fun initiate() {
|
||||
//如果不需要开麦,并且还没有权限的情况下,重置状态为需要去打开麦克风
|
||||
if (!AvRoomDataManager.get().mIsNeedOpenMic && !isHavingMicPermissions) {
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = true
|
||||
}
|
||||
myUid = AuthModel.get().currentUid
|
||||
isCloseScreen = AvRoomDataManager.get().isCloseScreen
|
||||
isOpenRedPackage = AvRoomDataManager.get().isOpenRedPackage
|
||||
@@ -547,10 +544,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
} else {
|
||||
val roomQueueInfo = AvRoomDataManager.get()
|
||||
.getRoomQueueMemberInfoByAccount(myUid.toString())
|
||||
if (((roomQueueInfo != null) && (roomQueueInfo.mChatRoomMember != null
|
||||
) && (myUid.toString() == roomQueueInfo.mChatRoomMember.account)
|
||||
&& (roomQueueInfo.mRoomMicInfo != null
|
||||
) && roomQueueInfo.mRoomMicInfo.isMicMute)
|
||||
if (roomQueueInfo?.mChatRoomMember != null
|
||||
&& myUid.toString() == roomQueueInfo.mChatRoomMember.account
|
||||
&& roomQueueInfo.mRoomMicInfo?.isMicMute == true
|
||||
) {
|
||||
//先判断坑位是否被闭麦了
|
||||
bottomView.setMicBtnEnable(false)
|
||||
@@ -734,7 +730,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
@CallSuper
|
||||
open fun onInviteUpMic(micPosition: Int) {
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = true
|
||||
mvpPresenter?.upMicroPhone(micPosition, AuthModel.get().currentUid.toString(), true)
|
||||
if (UIUtils.isTopActivity(baseActivity)) {
|
||||
(activity as BaseMvpActivity<*, *>?)?.dialogManager
|
||||
@@ -1208,7 +1203,6 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
rxPermissions.request(Manifest.permission.RECORD_AUDIO)
|
||||
.subscribe { aBoolean: Boolean ->
|
||||
if (aBoolean) {
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = false
|
||||
AudioEngineManager.get().isMute = !AudioEngineManager.get().isMute
|
||||
AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER)
|
||||
updateMicBtn()
|
||||
@@ -1218,23 +1212,13 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
return
|
||||
}
|
||||
val avRoomDataManager = AvRoomDataManager.get()
|
||||
val tmp = avRoomDataManager.mIsNeedOpenMic
|
||||
AudioEngineManager.get().isMute = !AudioEngineManager.get().isMute
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = AudioEngineManager.get().isMute
|
||||
updateMicBtn()
|
||||
if (!tmp) {
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_CP_ROOM_CLOSE_MIC_CLICK,
|
||||
"关闭麦克风"
|
||||
)
|
||||
} else {
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_MP_ROOM_CLOSE_MIC_CLICK,
|
||||
"关闭麦克风"
|
||||
)
|
||||
}
|
||||
if (AudioEngineManager.get().isMute) {
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_MP_ROOM_CLOSE_MIC_CLICK,
|
||||
"关闭麦克风"
|
||||
)
|
||||
} else if (AvRoomDataManager.get().isOnMic(myUid)) {
|
||||
AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER)
|
||||
}
|
||||
|
@@ -1758,7 +1758,6 @@ public final class IMNetEaseManager {
|
||||
noticeEnterMessages();
|
||||
//个播模式房主进房自动上麦
|
||||
if (AvRoomDataManager.get().isSingleRoom() && AvRoomDataManager.get().isRoomOwner()) {
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = true;
|
||||
AvRoomModel.get().upMicroPhone(
|
||||
-1,
|
||||
String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
@@ -1998,7 +1997,6 @@ public final class IMNetEaseManager {
|
||||
if (AvRoomDataManager.get().isOwner(account)) {
|
||||
// 更新声网闭麦 ,发送状态信息
|
||||
AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_AUDIENCE);
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = false;
|
||||
}
|
||||
roomQueueInfo.mChatRoomMember = null;
|
||||
// 通知界面更新麦序信息
|
||||
|
@@ -140,8 +140,9 @@ public final class AvRoomDataManager {
|
||||
public HashMap<String, List<Drawable>> mHeadWearMap;
|
||||
/**
|
||||
* 是否需要关麦,用户自己的行为,不受房主管理员的管理,与闭麦状态相同,当闭麦这个值就是ture;
|
||||
* 2022/9/1更改:无论什么情况上麦,默认都是关麦的!
|
||||
*/
|
||||
public boolean mIsNeedOpenMic = false;
|
||||
public final boolean mIsNeedOpenMic = true;
|
||||
/**
|
||||
* 是否需要打开礼物特效
|
||||
*/
|
||||
@@ -253,6 +254,7 @@ public final class AvRoomDataManager {
|
||||
* @param account 用户的id
|
||||
* @return 对应队列信息
|
||||
*/
|
||||
@Nullable
|
||||
public RoomQueueInfo getRoomQueueMemberInfoByAccount(String account) {
|
||||
if (TextUtils.isEmpty(account)) return null;
|
||||
RoomQueueInfo roomQueueInfo = null;
|
||||
|
@@ -532,7 +532,6 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
||||
}, UserModel.get().getCacheLoginUserInfo());
|
||||
|
||||
} else {
|
||||
AvRoomDataManager.get().mIsNeedOpenMic = true;
|
||||
//不在麦上就去上麦
|
||||
upMicroPhone(roomPKInvitedUpMicMember.getPosition(),
|
||||
roomPKInvitedUpMicMember.getUid(),
|
||||
|
Reference in New Issue
Block a user