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
36c0ed2a
Commit
36c0ed2a
authored
May 29, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 通话时长问题修复
parent
af04c26c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
33 deletions
+18
-33
config.gradle
config.gradle
+4
-4
build.gradle
m-audioim/build.gradle
+1
-1
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+13
-28
No files found.
config.gradle
View file @
36c0ed2a
...
...
@@ -5,7 +5,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.
88
"
,
"m-confide"
:
"0.0.49.
94
"
,
"m-consultant"
:
"0.0.60.27"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.18"
,
...
...
@@ -41,7 +41,7 @@ ext {
"ydl-webview"
:
"0.0.38.80"
,
"ydl-media"
:
"0.0.21.45"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.
29.93
"
,
"m-audioim"
:
"0.0.49.
30.00
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
@@ -90,7 +90,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.
88
"
,
"m-confide"
:
"0.0.49.
94
"
,
"m-consultant"
:
"0.0.60.27"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.18"
,
...
...
@@ -124,7 +124,7 @@ ext {
"ydl-webview"
:
"0.0.38.80"
,
"ydl-media"
:
"0.0.21.45"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.
29.93
"
,
"m-audioim"
:
"0.0.49.
30.00
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
m-audioim/build.gradle
View file @
36c0ed2a
...
...
@@ -75,7 +75,7 @@ dependencies {
kapt
"com.alibaba:arouter-compiler:$arouter_compiler"
api
"com.alibaba:arouter-api:$arouter_api"
implementation
"com.ydl:ydl-av:1.
3.9
"
implementation
"com.ydl:ydl-av:1.
4.2
"
implementation
'com.volcengine:apm_insight:1.4.6.cn'
if
(
rootProject
.
ext
.
dev_mode
){
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
36c0ed2a
...
...
@@ -524,7 +524,7 @@ class AudioHomeActivity :
writeAgoraLog
(
"主叫方发送的邀请通话消息内容:$content"
,
true
)
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"主叫方发送的邀请通话消息内容:$content"
)
localRemainTime
=
remainTime
?.
toInt
(
)
localRemainTime
=
(
totalDuration
?:
1500
).
minus
(
remainTime
?.
toInt
()
?:
1500
)
handler
=
Handler
()
vibrator
=
getSystemService
(
Service
.
VIBRATOR_SERVICE
)
as
Vibrator
?
}
...
...
@@ -564,8 +564,8 @@ class AudioHomeActivity :
tv_name
.
text
=
expertName
tv_tips
.
text
=
expertTips
tv_remain_time
.
text
=
DateUtils
.
formatTime
(
remainTime
)
var
time
=
totalDuration
?.
minus
(
remainTime
!!
.
toInt
())
tv_remain_time
.
text
=
DateUtils
.
formatTime
(
(
time
).
toString
()
)
if
(!
TextUtils
.
isEmpty
(
expertHeadUrl
))
{
var
option
=
SimpleImageOpConfiger
()
...
...
@@ -740,6 +740,7 @@ class AudioHomeActivity :
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
!!
.
headUrl
,
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
!!
.
userName
,
remainTime
!!
.
toInt
(),
totalDuration
?:
1500
,
relationId
,
callId
,
null
,
...
...
@@ -901,20 +902,6 @@ class AudioHomeActivity :
if
(
finishStatus
==
0
)
{
callStartTime
=
System
.
currentTimeMillis
()
}
// if(finishStatus==1){
// var param = ConnectFinishCommand(listenerUid!!, relationId!!, "0",
// remainTime!!.toInt() - localRemainTime!!, callId!!,
// "0","0","$callStartTime",
// "${System.currentTimeMillis()}",3)
// mPresenter.connectFinish(param)
// }else{
// 接通开始回调
// callStartTime = System.currentTimeMillis()
// var param = ConnectStartCommand(listenerUid!!, relationId!!, callId!!,
// "${System.currentTimeMillis()}","3","0","0","0","0")
// mPresenter.connectStart(param)
// }
}
/**
...
...
@@ -1057,7 +1044,7 @@ class AudioHomeActivity :
mPlayer
!!
.
setCompletionListener
(
MediaPlayer
.
OnCompletionListener
{
LogUtil
.
e
(
"播放结束"
)
//通话剩余时间不足60s时,默认
if
(
localRemainTime
!!
<
60
&&
!
TextUtils
.
isEmpty
(
commentUrl
))
{
if
(
localRemainTime
!!
>
(
totalDuration
?:
1500
).
minus
(
60
)
&&
!
TextUtils
.
isEmpty
(
commentUrl
))
{
val
h5Params
=
H5Params
(
commentUrl
!!
,
"评价"
)
NewH5Activity
.
start
(
this
@AudioHomeActivity
,
h5Params
)
}
...
...
@@ -1114,17 +1101,14 @@ class AudioHomeActivity :
//剩余倾诉时长倒计时
totalDisposable
=
Observable
.
interval
(
0
,
1
,
TimeUnit
.
SECONDS
).
subscribeOn
(
Schedulers
.
computation
())
.
take
(
remainTime
!!
.
toLong
()
+
1
).
observeOn
(
AndroidSchedulers
.
mainThread
())
Observable
.
interval
(
0
,
1
,
TimeUnit
.
SECONDS
)
.
subscribeOn
(
Schedulers
.
computation
())
.
take
(
remainTime
!!
.
toLong
()
+
1
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
localRemainTime
=
remainTime
!!
.
toInt
()
-
it
.
toInt
()
if
(
localRemainTime
==
180
)
{
playNoticeMusic
(
3
)
}
if
(
localRemainTime
==
60
)
{
playNoticeMusic
(
1
)
}
if
(
localRemainTime
!!
<=
60
)
{
localRemainTime
=
(
totalDuration
?:
1500
).
minus
(
remainTime
!!
.
toInt
()).
plus
(
it
.
toInt
())
if
(
localRemainTime
!!
>=
(
totalDuration
?:
1500
).
minus
(
60
))
{
if
(
ll_changeRoute
.
isEnabled
)
{
ll_changeRoute
.
isEnabled
=
false
}
...
...
@@ -1178,6 +1162,7 @@ class AudioHomeActivity :
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
!!
.
headUrl
,
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
!!
.
userName
,
remainTime
!!
.
toInt
(),
totalDuration
?:
1500
,
relationId
,
callId
,
null
,
...
...
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