just_audio
just_audio copied to clipboard
Update currentIndex when sequence is changed
There's a TODO in the codebase. This is needed for ConcatenatingAudioSource.clear to work correctly.
https://github.com/ryanheise/just_audio/blob/79d8741ef2d0a52289ac831c21967d1bad0f4f55/just_audio/lib/just_audio.dart#L789
void _broadcastSequence() {
// TODO: update currentIndex first if it's out of range as a result of
// removing items from the playlist.
_sequenceSubject.add(_audioSource?.sequence);
_updateShuffleIndices();
}