Commit 2fb167a1 by YKai

feat: 修复倾诉挂断延迟执行问题

parent cebfc34e
......@@ -673,12 +673,12 @@ class AudioHomeActivity :
tv_name.text = expertName
// tv_tips.text = expertTips
var time = totalDuration?.minus(remainTime!!.toInt())
val time = totalDuration?.minus(remainTime!!.toInt())
tv_remain_time.text = DateUtils.formatTime((time).toString())
val timeTotal= totalDuration?.div(60);
tv_totalDuration.text="(满${timeTotal}分钟自动挂断,限24小时内拨打)"
if (!TextUtils.isEmpty(expertHeadUrl)) {
var option = SimpleImageOpConfiger()
val option = SimpleImageOpConfiger()
option.errorPic = R.drawable.audioim_head_place_hold_pic
option.loadingPic = R.drawable.audioim_head_place_hold_pic
option.transform = 0
......@@ -1425,7 +1425,7 @@ class AudioHomeActivity :
null,
channelId
)
var cmd = NoticePushCommand()
val cmd = NoticePushCommand()
cmd.data = msgBean
cmd.pushId = listenerUid
if (isCall) {
......@@ -1452,6 +1452,8 @@ class AudioHomeActivity :
LogUtil.e("播放结束音频")
//播放结束音频
playFinishMusic()
// 声网离开房间
voiceManage?.getVoiceApi()?.leaveChannel()
}
}
......@@ -1577,11 +1579,11 @@ class AudioHomeActivity :
eventType: String = "99",
callback: YDLavManager.UploadExceptionCallback?
) {
var time: String = (System.currentTimeMillis() / 1000).toString()
var uid: String =
val time: String = (System.currentTimeMillis() / 1000).toString()
val uid: String =
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid!!
var payLoad = PayLoad(channelId ?: "0", time, uid, "1", "999", message)
var connectException =
val payLoad = PayLoad(channelId ?: "0", time, uid, "1", "999", message)
val connectException =
ConnectExceptionCommand(time + zhu, "2", eventType, payLoad, callStatus)
YDLavManager.instances.uploadException(connectException, callback)
}
......@@ -1598,7 +1600,7 @@ class AudioHomeActivity :
}
override fun finishActivity() {
leaveChannel()
// leaveChannel()
}
override fun onDestroy() {
......@@ -1640,7 +1642,10 @@ class AudioHomeActivity :
localPowerManager = null
if (null != voiceManage && null != voiceManage?.getVoiceApi()) {
if (!isLeavelChannel) {
// 声网离开房间
voiceManage?.getVoiceApi()?.leaveChannel()
}
voiceManage?.getVoiceApi()?.destroy()
voiceManage = null
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment