|
@@ -111,7 +111,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
private var anchorRoomFragment: AnchorRoomFragment? = null
|
|
|
|
|
|
private var anchorCloseDialog: AnchorCloseDialog? = null
|
|
|
- private var noFaceShowDialog: NoFaceShowDialog? = null
|
|
|
|
|
|
private fun initPushView() {
|
|
|
mVideoManager.setCameraStateListener(object :
|
|
@@ -155,9 +154,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
private var selectedBgUrl = ""
|
|
|
private var checkPassword = false
|
|
|
|
|
|
- private lateinit var countDownTimer: CountDownTimer
|
|
|
- private var startFaceShowTimer = true
|
|
|
- private var liveNoFaceTime:Long = 600000
|
|
|
|
|
|
override fun initLiveData() {
|
|
|
PKStateManager.resetData()
|
|
@@ -235,8 +231,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
mVideoManager.stopCapture()
|
|
|
AgoraManager.setVideoAudio(pullVideo = false, pullAudio = true, pushVideo = false, pushAudio = true)
|
|
|
roomType = RoomType.AUDIO
|
|
|
- startFaceShowTimer = true
|
|
|
- countDownTimer.cancel()
|
|
|
binding.viewAudio.visibility = View.VISIBLE
|
|
|
binding.viewVideo.visibility = View.INVISIBLE
|
|
|
binding.ivBeauty.visibility = View.GONE
|
|
@@ -408,25 +402,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
binding.cbPassword.text = if (isChecked) getString(R.string.lock_room_on) else getString(R.string.lock_room_off)
|
|
|
checkPassword = isChecked
|
|
|
}
|
|
|
- countDownTimer = object : CountDownTimer(liveNoFaceTime, 60000) {
|
|
|
- override fun onTick(millisUntilFinished: Long) {
|
|
|
- LogUtil.d("millisUntilFinished${millisUntilFinished / 1000}")
|
|
|
- if (millisUntilFinished/1000 in 58L..60L ){
|
|
|
- LogUtil.d("millisUntilFinished:show")
|
|
|
- if (noFaceShowDialog == null){
|
|
|
- noFaceShowDialog = NoFaceShowDialog.newInstance()
|
|
|
- }
|
|
|
- noFaceShowDialog?.show(supportFragmentManager , "NoFaceShowDialog")
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- override fun onFinish() {
|
|
|
- roomVm.uploadBroadcast()
|
|
|
- noFaceShowDialog?.dismissAllowingStateLoss()
|
|
|
- SwagoRoomManager.closeRoom()
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -494,7 +469,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
|
|
|
override fun onDestroy() {
|
|
|
anchorCloseDialog = null
|
|
|
- noFaceShowDialog = null
|
|
|
PKStateManager.removePKListener(this)
|
|
|
AudioRoomManager.removeListener(this)
|
|
|
agoraService?.let { stopService(it) }
|
|
@@ -545,16 +519,6 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
|
|
|
faces: Array<out IRtcEngineEventHandler.AgoraFacePositionInfo>?
|
|
|
) {
|
|
|
LogUtil.d("onFacePositionChanged${faces?.size}")
|
|
|
- if (faces.isNullOrEmpty()){
|
|
|
- if (startFaceShowTimer){
|
|
|
- countDownTimer.start()
|
|
|
- startFaceShowTimer = false
|
|
|
- }
|
|
|
- } else {
|
|
|
- startFaceShowTimer = true
|
|
|
- countDownTimer.cancel()
|
|
|
- noFaceShowDialog?.dismissAllowingStateLoss()
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**************************PK******************************/
|