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
92240540
Commit
92240540
authored
Apr 16, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
声网发版
parent
86e42944
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
29 deletions
+43
-29
config.gradle
config.gradle
+3
-3
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+37
-23
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+3
-3
No files found.
config.gradle
View file @
92240540
...
...
@@ -42,7 +42,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.2
0
"
,
"m-confide"
:
"0.0.48.2
2
"
,
"m-consultant"
:
"0.0.59.7"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.4"
,
...
...
@@ -75,7 +75,7 @@ ext {
"ydl-webview"
:
"0.0.38.29"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.4
8.8
"
,
"m-audioim"
:
"0.0.4
9.0
"
,
"ydl-flutter-base"
:
"0.0.14.12"
,
//以下 几乎不会动
...
...
@@ -121,7 +121,7 @@ ext {
"ydl-webview"
:
"0.0.38.29"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.4
8.8
"
,
"m-audioim"
:
"0.0.4
9.0
"
,
"ydl-flutter-base"
:
"0.0.10.9"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
92240540
...
...
@@ -571,14 +571,17 @@ class AudioHomeActivity :
writeAgoraLog
(
"未接通挂断:60s等待倒计时结束挂断"
)
//提示切换传统线路
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
...
...
@@ -628,19 +631,24 @@ class AudioHomeActivity :
*/
private
fun
userCloseCalling
()
{
writeAgoraLog
(
"未接听时:主叫主动挂断,取消呼叫"
)
LogUtil
.
e
(
"未接听挂断"
)
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
writeAgoraLog
(
"未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断"
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
writeAgoraLog
(
"未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断"
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
handler
!!
.
postDelayed
({
LogUtil
.
e
(
"离开频道"
)
leaveChannel
()
},
100
)
}
...
...
@@ -728,14 +736,17 @@ class AudioHomeActivity :
//未连接成功,切换axb时:需发送消息通知专家端用户已挂断
//发送消息通知专家用户已挂断
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
override
fun
onSuccess
()
{
}
})
leaveChannel
()
}
}
...
...
@@ -840,6 +851,7 @@ class AudioHomeActivity :
mPlayer
!!
.
setDataSource
(
R
.
raw
.
audioim_hand_down_music
)
mPlayer
!!
.
switchPlayType
(
iv_hands_free
.
isSelected
)
mPlayer
!!
.
setCompletionListener
(
MediaPlayer
.
OnCompletionListener
{
LogUtil
.
e
(
"播放结束"
)
//通话剩余时间不足60s时,默认
if
(
localRemainTime
!!
<
60
&&
!
TextUtils
.
isEmpty
(
commentUrl
))
{
val
h5Params
=
H5Params
(
commentUrl
!!
,
"评价"
)
...
...
@@ -1001,6 +1013,7 @@ class AudioHomeActivity :
//刷新h5页面
EventBus
.
getDefault
().
post
(
RefreshWebEvent
(
false
))
stopPlaying
()
LogUtil
.
e
(
"播放结束音频"
)
//播放结束音频
playFinishMusic
()
}
...
...
@@ -1157,6 +1170,7 @@ class AudioHomeActivity :
if
(
mPlayer
!=
null
)
{
mPlayer
!!
.
clear
()
mPlayer
=
null
}
}
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
92240540
...
...
@@ -140,9 +140,9 @@ class YDLavManager {
if
(
act
is
AudioHomeActivity
)
{
act
.
runOnUiThread
{
act
.
writeAgoraLog
(
"呼叫失败:${errorCode}"
)
//通话结束或挂断时,上传日志文件
act
.
uploadLog
()
act
.
leaveChannel
()
//
//通话结束或挂断时,上传日志文件
//
act.uploadLog()
//
act.leaveChannel()
}
}
}
...
...
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