mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
changes to fix non-reset media player re-use crash
This commit is contained in:
@@ -805,7 +805,7 @@ class ComposeViewModel @Inject constructor(
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe {
|
||||
// stop any audio playback (ie from mms attachment or audio recorder)
|
||||
QkMediaPlayer.stop()
|
||||
QkMediaPlayer.reset()
|
||||
|
||||
// if leaving audio recording mode
|
||||
if (!it.audioMsgRecording) {
|
||||
@@ -915,6 +915,8 @@ class ComposeViewModel @Inject constructor(
|
||||
.build()
|
||||
)
|
||||
|
||||
QkMediaPlayer.reset()
|
||||
|
||||
QkMediaPlayer.setDataSource(context, MediaRecorderManager.uri)
|
||||
|
||||
QkMediaPlayer.prepareAsync()
|
||||
|
||||
Reference in New Issue
Block a user