Baseflow / XamarinMediaManager

Cross platform Xamarin plugin to play and control Audio and Video
https://baseflow.com
MIT License
762 stars 305 forks source link

MediaItemFinished randomly fires when switching songs sometimes #842

Open jimdog1001 opened 2 years ago

jimdog1001 commented 2 years ago

🐛 Bug Report

im using xamarin forms and testing on Android. I have 4 buttons and each time i click the button to play a song, i call the media player to play it. I also have an event to listen for when the song ends, which is working as expected. What is not working correctly is that sometimes, when switching songs, the event gets triggered even though a media item hasn't finished.

Expected behavior

should only fire when the song ends

Reproduction steps

have buttons that play different songs, i have 4 in mine. Set up and mediaItemFinished event and have it do something when the song ends. Start switching songs by clicking on different buttons and notice that the mediaItemFinshed event is executing code when it shouldnt be.

Configuration

Version: 1.x

Platform: