上麦改为默认闭麦
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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user