forked from upstream-mirrors/quik
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())
|
.autoDisposable(view.scope())
|
||||||
.subscribe {
|
.subscribe {
|
||||||
// stop any audio playback (ie from mms attachment or audio recorder)
|
// stop any audio playback (ie from mms attachment or audio recorder)
|
||||||
QkMediaPlayer.stop()
|
QkMediaPlayer.reset()
|
||||||
|
|
||||||
// if leaving audio recording mode
|
// if leaving audio recording mode
|
||||||
if (!it.audioMsgRecording) {
|
if (!it.audioMsgRecording) {
|
||||||
@@ -915,6 +915,8 @@ class ComposeViewModel @Inject constructor(
|
|||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
QkMediaPlayer.reset()
|
||||||
|
|
||||||
QkMediaPlayer.setDataSource(context, MediaRecorderManager.uri)
|
QkMediaPlayer.setDataSource(context, MediaRecorderManager.uri)
|
||||||
|
|
||||||
QkMediaPlayer.prepareAsync()
|
QkMediaPlayer.prepareAsync()
|
||||||
|
|||||||
Reference in New Issue
Block a user