We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter Version Flutter stable: 3.22.1
Lib Version assets_audio_player: ^3.1.1
** Platform (Android / iOS ) **
Two audio tracks play simultaneously when I close and reopen the app. I tried to call the stop() method, but it didn't work to stop the first track.
Future<List<StationModel>> onInitApp() async { bool isPlaying = audioPlayer.isPlaying.value; if (isPlaying) await audioPlayer.stop(); final repository = ref.watch(radioRepositoryProvider); final result = await repository.getHistorys(stations); return result.fold((l) => throw l.message, (r) async { Box<dynamic> settings = Boxes.settings(); int lastIndex = settings.get(Keys.lastIndex, defaultValue: 0); List<Audio> audios = _stationToMediaItem(r); await audioPlayer.open( Playlist( audios: audios, startIndex: lastIndex, ), showNotification: true, autoStart: true, ); return r; }); }
The text was updated successfully, but these errors were encountered:
florent37
No branches or pull requests
Flutter Version
Flutter stable: 3.22.1
Lib Version
assets_audio_player: ^3.1.1
** Platform (Android / iOS ) **
Two audio tracks play simultaneously when I close and reopen the app.
I tried to call the stop() method, but it didn't work to stop the first track.
The text was updated successfully, but these errors were encountered: