Closed Chaphasilor closed 7 months ago
About this.. Yes, I had also noticed this while working on my media app, but I couldn't find any fixes for this (an attempt to do so can also be found in mediakit_player.dart:135.
Looking at this better, it seems that it is already implemented in upstream (media-kit/media-kit#581). I'll fix this soon.
EDIT: it seems that the latest version doesn't include this fix. For the time being, I guess the best way is to use the workaround described in https://github.com/media-kit/media-kit/issues/228#issuecomment-1803747439.
Interesting. I'll try this out tomorrow. Thanks for taking a look.
Hopefully the fix will be released soon, but the workaround would definitely be nice to have if it works. I'll report back!
@Chaphasilor Any news?
Haven't had time to look at it yet, busy with exams. But we're making progress with desktop support on all fronts, so I will definitely check this out in the coming days!
just_audio_media_kit
v2.0.2 has been published which includes the fix (albeit temporary)
Okay, technically that was "in the coming days", but I'm still sorry it took me so long to take a look. Everything works fine with the update! Thanks a lot :)
Onto the remaining issues... ^^
We have a feature where the last queue is restored when restarting our app. If the user already listened to X seconds of the current track, the player state will be restored to that position by first loading the queue (a
ConcatenatingAudioSource
), and then callingplayer.seek()
to set the player to the correct position.However, the position will reset to 0 before playback starts. I've had it work before when using debug builds (release build didn't work), but cannot reproduce that any longer. Currently it's resetting to 0 every time.
Similar behavior can also be observed with the just_audio_media_kit_example project, where seeking before playback starts will also be briefly reflected in the UI, but then playback will start at 0. This can be tested with the following modification: