Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
248e4ca9
Commit
248e4ca9
authored
Aug 29, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ding改30s,leave加reason
parent
5e9cb2bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+16
-14
NetQuality.kt
m-audioim/src/main/java/com/ydl/audioim/NetQuality.kt
+1
-1
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
248e4ca9
...
...
@@ -283,7 +283,7 @@ class AudioHomeActivity :
writeAgoraLog
(
"被叫(专家)拒绝了通话邀请"
)
//通话结束或挂断时,上传日志文件
uploadLog
()
leaveChannel
()
leaveChannel
(
1
)
uploadExceptionStatus
(
"对方已拒绝"
,
2
)
}
}
...
...
@@ -424,7 +424,7 @@ class AudioHomeActivity :
RtcEvent
(
RtcEvent
.
Event
.
connectionChanged
),
errorCode
=
state
,
errorReason
=
reason
.
toString
()
)
if
(
reason
==
3
)
{
if
(
reason
==
3
)
{
//网络连接被服务器禁止
callEventSave
(
"50"
,
"通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason}"
)
writeAgoraLog
(
"通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason})"
)
AliYunRichLogsHelper
.
getInstance
()
...
...
@@ -435,7 +435,7 @@ class AudioHomeActivity :
// com.yidianling.common.tools.ToastUtil.toastShort("专家已挂断")
//通话结束或挂断时,上传日志文件
uploadLog
()
leaveChannel
()
leaveChannel
(
2
)
}
}
...
...
@@ -477,7 +477,7 @@ class AudioHomeActivity :
if
(
reason
==
Constants
.
USER_OFFLINE_DROPPED
)
{
YDLavManager
.
instances
.
callEndStatusUpdate
(
channelId
,
3
,
"对方超时掉线"
)
}
leaveChannel
()
leaveChannel
(
3
)
if
(
totalDisposable
!=
null
)
{
totalDisposable
?.
dispose
()
...
...
@@ -802,12 +802,12 @@ class AudioHomeActivity :
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"已接通:主叫主动挂断 channelId:${channelId}"
)
updateExpertStatus
(
false
,
1
)
leaveChannel
()
leaveChannel
(
4
)
uploadLog
()
YDLavManager
.
instances
.
callEndStatusUpdate
(
channelId
!!
,
5
,
"主叫挂断"
)
callEventSave
(
"51"
,
"已接通:主叫主动挂断"
)
}
else
{
userCloseCalling
()
userCloseCalling
(
4
)
}
ActionCountUtils
.
count
(
...
...
@@ -1094,7 +1094,7 @@ class AudioHomeActivity :
uploadLog
()
showToast
(
"暂时无法接通,建议稍后尝试"
)
userCloseCalling
()
userCloseCalling
(
7
)
}
}
...
...
@@ -1167,7 +1167,7 @@ class AudioHomeActivity :
* 注意:这个方法只在专家还未接听的状态才能调用
*
*/
private
fun
userCloseCalling
()
{
private
fun
userCloseCalling
(
reason
:
Int
)
{
callEventSave
(
"32"
,
"未接听时:主叫(用户)主动挂断,取消呼叫"
)
writeAgoraLog
(
"未接听时:主叫(用户)主动挂断,取消呼叫"
)
...
...
@@ -1190,7 +1190,7 @@ class AudioHomeActivity :
uploadLog
()
handler
?.
postDelayed
({
LogUtil
.
e
(
"离开频道"
)
leaveChannel
()
leaveChannel
(
reason
)
},
100
)
}
...
...
@@ -1228,7 +1228,7 @@ class AudioHomeActivity :
// 如果声网未连接成功,切换axb的弹框是自动弹出的,当关闭弹框的时候,执行用户挂断操作
// 如果声网连接成功,点击右上角按钮弹出切换axb弹框,但是关闭时用户不执行挂断操作
if
(!
isConnectSuccess
)
{
userCloseCalling
()
userCloseCalling
(
-
1
)
}
}
})
...
...
@@ -1285,7 +1285,7 @@ class AudioHomeActivity :
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"未接听时:主叫主动挂断失败,msg=$msg($code),再次挂断 channelId:${channelId}"
)
}
leaveChannel
()
leaveChannel
(
8
)
}
}
...
...
@@ -1438,7 +1438,7 @@ class AudioHomeActivity :
},
{
LogUtil
.
d
(
it
.
message
)
},
{
leaveChannel
()
leaveChannel
(
9
)
uploadLog
()
callEventSave
(
"50"
,
"倾诉时间已用完"
)
YDLavManager
.
instances
.
callEndStatusUpdate
(
channelId
!!
,
50
,
"倾诉时间已用完"
)
...
...
@@ -1516,8 +1516,10 @@ class AudioHomeActivity :
/**
* 声网离开频道
* 未知-1拒绝1网络连接被服务器禁止2对方掉线或离开3主动挂断或取消4被叫接听超时7转AXB8倾诉时间用完9
* 出异常10,加入通道超时11,声网Error12,页面销毁13
*/
fun
leaveChannel
()
{
fun
leaveChannel
(
reason
:
Int
)
{
LogUtil
.
e
(
"调用leaveChannel方法,isLeavelChannel=$isLeavelChannel"
)
if
(!
isLeavelChannel
)
{
isLeavelChannel
=
true
...
...
@@ -1529,7 +1531,7 @@ class AudioHomeActivity :
//播放结束音频
playFinishMusic
()
// 声网离开房间
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
RtcEvent
(
RtcEvent
.
Event
.
leave
))
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
RtcEvent
(
RtcEvent
.
Event
.
leave
)
,
retCode
=
reason
)
voiceManage
?.
getVoiceApi
()
?.
leaveChannel
()
}
}
...
...
m-audioim/src/main/java/com/ydl/audioim/NetQuality.kt
View file @
248e4ca9
...
...
@@ -96,7 +96,7 @@ class NetQuality(
if
(
reason
==
Constants
.
REMOTE_AUDIO_REASON_NETWORK_CONGESTION
&&
state
==
Constants
.
REMOTE_AUDIO_STATE_FROZEN
)
{
val
qualityValue
=
MMKV
.
defaultMMKV
().
getString
(
"network_quality_config"
,
"0"
)
if
(
TextUtils
.
equals
(
qualityValue
,
"1"
))
{
if
(
System
.
currentTimeMillis
()
-
lastOnRemoteNetworkCongestion
>
1
0
*
1000
)
{
if
(
System
.
currentTimeMillis
()
-
lastOnRemoteNetworkCongestion
>
3
0
*
1000
)
{
lastOnRemoteNetworkCongestion
=
System
.
currentTimeMillis
()
voiceManage
?.
getVoiceApi
()
?.
playEffect
(
3001
,
getNetLowEffect
(
activity
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment