Pause playback instead of reset when recording a new voice message
This commit is contained in:
parent
a73e707f33
commit
7349bc90c0
|
@ -66,7 +66,7 @@ class AudioMessageHelper @Inject constructor(
|
|||
|
||||
fun startRecording(roomId: String) {
|
||||
stopPlayback()
|
||||
playbackTracker.makeAllPlaybacksIdle()
|
||||
playbackTracker.pauseAllPlaybacks()
|
||||
amplitudeList.clear()
|
||||
|
||||
try {
|
||||
|
|
|
@ -51,15 +51,7 @@ class AudioMessagePlaybackTracker @Inject constructor() {
|
|||
}
|
||||
|
||||
fun pauseAllPlaybacks() {
|
||||
listeners.keys.forEach { key ->
|
||||
pausePlayback(key)
|
||||
}
|
||||
}
|
||||
|
||||
fun makeAllPlaybacksIdle() {
|
||||
listeners.keys.forEach { key ->
|
||||
setState(key, Listener.State.Idle)
|
||||
}
|
||||
listeners.keys.forEach(::pausePlayback)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue