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
c734eb47
Commit
c734eb47
authored
Sep 01, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换音频文件
parent
b23df313
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
4 deletions
+11
-4
effect_net_quality_low.m4a
m-audioim/src/main/assets/effect_net_quality_low.m4a
+0
-0
effect_net_quality_low.mp3
m-audioim/src/main/assets/effect_net_quality_low.mp3
+0
-0
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+1
-1
NetQuality.kt
m-audioim/src/main/java/com/ydl/audioim/NetQuality.kt
+9
-2
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+1
-1
No files found.
m-audioim/src/main/assets/effect_net_quality_low.m4a
0 → 100644
View file @
c734eb47
File added
m-audioim/src/main/assets/effect_net_quality_low.mp3
deleted
100644 → 0
View file @
b23df313
File deleted
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
c734eb47
...
...
@@ -1592,7 +1592,7 @@ class AudioHomeActivity :
/**
* 网络状态
*/
private
fun
showNetStatus
(
msg
:
String
,
status
:
Int
=
0
)
{
fun
showNetStatus
(
msg
:
String
,
status
:
Int
=
0
)
{
LogUtil
.
e
(
"showNetStatus: msg=$msg,status=$status"
)
if
(
tv_nte_status
.
visibility
==
View
.
VISIBLE
)
{
return
...
...
m-audioim/src/main/java/com/ydl/audioim/NetQuality.kt
View file @
c734eb47
...
...
@@ -9,6 +9,7 @@ import android.widget.TextView
import
com.tencent.mmkv.MMKV
import
com.ydl.audioim.http.AudioApiRequestUtil
import
com.ydl.audioim.http.RtcEvent
import
com.ydl.consultantim.ConsultantAudioHomeActivity
import
com.ydl.ydl_av.voice.listener.RtcNetInterface
import
com.ydl.ydl_av.voice.manager.YDLVoiceManager
import
com.ydl.ydlcommon.utils.log.XLog
...
...
@@ -101,6 +102,11 @@ class NetQuality(
voiceManage
?.
getVoiceApi
()
?.
playEffect
(
3001
,
getNetLowEffect
(
activity
))
}
if
(
activity
is
AudioHomeActivity
)
{
activity
.
showNetStatus
(
"对方的网络状况不佳"
,
0
)
}
else
if
(
activity
is
ConsultantAudioHomeActivity
)
{
activity
.
showNetStatus
(
"对方的网络状况不佳"
,
0
)
}
}
}
}
...
...
@@ -120,7 +126,7 @@ class NetQuality(
}
fun
getNetLowEffect
(
context
:
Context
):
String
{
return
context
.
filesDir
.
absolutePath
+
"/sounds/effect_net_quality_low.m
p3
"
return
context
.
filesDir
.
absolutePath
+
"/sounds/effect_net_quality_low.m
4a
"
}
fun
copySoundFile
(
context
:
Context
?)
{
...
...
@@ -131,13 +137,14 @@ class NetQuality(
if
(!
soundFile
.
exists
())
{
soundFile
.
mkdir
()
}
val
filesName
=
arrayOf
(
"effect_hand_up.mp3"
,
"effect_net_quality_low.m
p3
"
)
val
filesName
=
arrayOf
(
"effect_hand_up.mp3"
,
"effect_net_quality_low.m
4a
"
)
filesName
.
forEach
{
val
file
=
File
(
soundFile
,
it
)
if
(!
file
.
exists
())
{
file
.
createNewFile
()
val
fileOutputStream
=
FileOutputStream
(
file
)
context
.
assets
.
open
(
it
).
copyTo
(
fileOutputStream
)
fileOutputStream
.
close
()
}
}
}
...
...
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
c734eb47
...
...
@@ -959,7 +959,7 @@ class ConsultantAudioHomeActivity :
/**
* 网络状态
*/
private
fun
showNetStatus
(
msg
:
String
,
status
:
Int
=
0
)
{
fun
showNetStatus
(
msg
:
String
,
status
:
Int
=
0
)
{
runOnUiThread
{
if
(
TextUtils
.
isEmpty
(
msg
))
{
tv_nte_status
.
visibility
=
View
.
GONE
...
...
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