just_audio icon indicating copy to clipboard operation
just_audio copied to clipboard

Update currentIndex when sequence is changed

Open arreshashikant opened this issue 1 year ago • 2 comments

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();
  }

arreshashikant avatar May 20 '23 02:05 arreshashikant