Pato05 / just_audio_media_kit

A platform interface for just_audio which wraps media_kit
The Unlicense
8 stars 11 forks source link

Player sends PlayState.completed event at wrong occasion #5

Closed Chaphasilor closed 6 months ago

Chaphasilor commented 6 months ago

For completeness's sake, here's the issue related to #4 (and my comment in #3). The reason I originally thought the issue might be related was this section:

this implementation stores player's queue in a separate variable, and then feeds the player with currently playing media, one by one, instead of giving the player the complete playlist.

I thought something might be fundamentally wrong with the queueing, but that doesn't seem to be the case. Instead, a completed event is sent after each track finishes playing, when instead it should be sent after each AudioSource stops playing. In the case of a ConcatenatingAudioSource, this means the event should be fired after the last track finishes playing, with looping disabled.
Please also see the discussion in #4, where this is explained in greater detail.

Pato05 commented 6 months ago

Fixed by 3c82785.

Please try using the new version (by using the git version in your pubspec.yaml), and check if everything works as expected. If it doesn't, feel free to reopen this issue. I'll be releasing a new version on pub.dev after merging #7 as well.