[Bug]: Music plays automatically when headphones are plugged in
sinoory opened this issue · comments
What happened?
step:
- play music with speaker
- pause music play
- plug in a headphone
expect not play music after plug in a headphone, but actually does
when headphone plug in ,onPrepared function in com/iven/musicplayergo/player/MediaPlayerHolder.kt called,
maybe the isPlay flag is wrong after pause music。
override fun onPrepared(mp: MediaPlayer) {
if (isPlay) {
play()
Version
4.4.20
Device and Android version
android12
Relevant log output
No response
More info
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
There's an option to disable headset management 😉
There's an option to disable headset management wink
ok close it