Questions tagged [audio-service]

audio_service plugin for Flutter

Use for questions about the audio_service plugin for Flutter

118 questions
4
votes
1 answer

How to catch an audio file url issue?

I am using audio_service with just_audio and have constructed a minimal example repo using the tutorial code I found in the repo. If the URL I use to initialize the AudioPlayerHandler is incorrect for any reason (hardcoded in the example code just…
Survy
  • 118
  • 7
3
votes
1 answer

Flutter - How to create two audio handler using just audio and audio service?

I am working on a meditation app where a background music starts to play when the user opens the app. App Displays list of playlist. When user click on the playlist it should play the playlist audio and pause the background music. If the music…
Ranjit Shrestha
  • 622
  • 6
  • 24
3
votes
1 answer

Differenciating stop and dispose with audio_service's AudioHandler for Flutter app

The just_audio AudioPlayer allows you to both stop and dispose: _player.stop(); _player.dispose(); You use stop when you still might want to start playing again in the future whereas dispose is for when you are completely done. My problem is that…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2
votes
0 answers

Just Audio Background Media player doesn't show buttons

Added Just Audio Background functionality to Just Audio Playlist example and I could see player to run fine in the background but previous / play / pause / next buttons aren't visible. Although, I could virtually press and functionality works as…
2
votes
0 answers

Audio stop when phone sleep

in my Flutter app I can play a list of radio stations, but if while the audio is playing, I put the app in the background and lock the screen, sometimes immediately or after 30 seconds, the audio is interrupted and the control center is set with a…
2
votes
0 answers

Can I hide Android Notification bar if I used Audio Service in Flutter?

I used the latest Dart package of audio_service (0.18.4). My use case is different. I have main menu on the first screen and another sub-menu to play music in the other screen. I just want to hide the Notification bar after user click on close…
Wege
  • 105
  • 9
2
votes
1 answer

'_cacheManager == null': is not true audio service issue fix

If anybody getting an issue in the audio_service library in flutter then this minor code may be helpful in fixing it WillPopScope( onWillPop: () async { await _audioHandler.stop(); return true; }, child: Scaffold(...))
2
votes
2 answers

Audio not looping in the background

My implementation loops in the foreground. It also works in the background. The issue is it does NOT loop in the background. The issue happens only on iOS physical device (not on Simulator, nor Android). I'm using…
Tomas Baran
  • 1,570
  • 2
  • 20
  • 37
2
votes
1 answer

Enable or Disable Lockscreen art in Audio_Service Flutter

This question is specifically related to the Audio Service package in flutter. Till v0.17.0 there was a lock screen art but it's not there in v0.18.0. So, I just wanted to know if there's any specific method by which I can enable as well as disable…
Ankit Sangwan
  • 1,138
  • 1
  • 7
  • 20
2
votes
3 answers

A lot of errors after upgrade to flutter 2.5.0

I have updated Flutter to 2.5.0 in my project and getting a lot of errors, for example: Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ …
1
vote
0 answers

Why is the notification bar's button not updating to a play button when I tap the pause button

When I use the Audio_service package in Flutter on my Android 11 device, clicking the playback pause button in the Flutter UI is valid, but clicking the buttons other than the pause button in the notification bar button is valid, and the…
MYB
  • 11
  • 3
1
vote
0 answers

How to detect audio notification being swiped away using Flutter audio_service?

I initialized my AudioPlayerService class AudioPlayerService { ... Future initMyAudioHandler() async { return await AudioService.init( builder: () => MyAudioHandler(), config: const AudioServiceConfig( …
Edward Cahyadi
  • 450
  • 5
  • 9
1
vote
1 answer

Audio not starting when loading Just Audio player

I'm new to Flutter and followed this tutorial https://suragch.medium.com/background-audio-in-flutter-with-audio-service-and-just-audio-3cce17b4a7d to setup Just Audio and audioservice. I'm building my app for Android at the moment. I'm having 3…
1
vote
1 answer

Flutter audio_service does not start when the app is not in the foreground on iOS

I've been building a Flutter app that needs to trigger an alarm while in the background. I am using audio_service in combination with just_audio (latest versions of both) but am only hearing the alarm if it is triggered when the app is in the…
Steve Neal
  • 756
  • 3
  • 8
  • 16
1
vote
0 answers

Flutter audioHandler audio_service package

I would like to add the following example https://suragch.medium.com/background-audio-in-flutter-with-audio-service-and-just-audio-3cce17b4a7d a button that replaces the playlist with another one and plays it. I created a function that removes all…
elle D
  • 25
  • 4
1
2 3 4 5 6 7 8