How can I clean the Audio Playlist ConcatenatingAudioSource after adding some Audio Chapters to the PLaylist in Audio Service? I am using the AudioPlayerHandlerImpl Singleton class to access all the Audio Service functionality...
so I want to Clean the Audio Playlist when the user Logout from the app I want to hit the function where all the Audio playlists will be cleaned.
I try to clean the playlist using this function
final _player = AudioPlayer(); final _playlist = ConcatenatingAudioSource(children: []); Future<void> emptyPlaylist() async { await _player .setAudioSource(_playlist, preload: false) .onError((error, stackTrace) { _onError(error, stackTrace, stopService: true); return null; });
but this function is not clearing the playlist i need help :-)