Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to Clean Audio Playlist in audio service flutter app

$
0
0

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 :-)


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>