Questions tagged [just-audio]

just_audio is a Flutter plugin for playing audio from files, assets, URLs and byte streams.

Use this tag ask questions about just_audio.

  • State your question clearly.
  • Describe what you have already tried.
  • If you include code snippets, explain the relevant sections as they pertain to your question.

If you haven't done so already, check the relevant API documentation for the problematic methods you are trying to use, or if your question is about feature availability, make sure you first check the supported feature list in the README.

If you are confident that you have found a bug in just_audio itself, or you would like to suggest a new feature that is currently not supported, you can submit a GitHub issue.

289 questions
2
votes
1 answer

How to pass and play specific queue position media item from playlist in audio_service flutter?

I am using flutter audio_service and just_audio package for music player. I want to play specific queue position media item from playlist when I initialize the music player. It is always playing first item of the playlist when I called…
Ranjit Shrestha
  • 622
  • 6
  • 24
2
votes
1 answer

How to find the current song duration in Flutter with audio_service and just_audio

The when you set the MediaItem in audio_service you don't know the song duration yet because just_audio hasn't had a change to tell you at this point. The FAQs say to update the MediaItem like this: modifiedMediaItem = mediaItem.copyWith(duration:…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2
votes
1 answer

How can I modify the queue in just_audio?

I'm trying to make a music app using just_audio and audio_service and I'm stuck at implementing the onAddQueueItem function. I can't find a way to append/modify the queue on just_audio, only how to reload just_audio with a new playlist via…
UnicornsOnLSD
  • 631
  • 6
  • 24
2
votes
2 answers

Flutter IOS just_audio not playing when phone in silent mode

I am developing an audio app. To play the various audio files I am using the just_audio package: Just_Audio It works fine on Android phones, but with iPhones when the phone is set to silent mode it is not playing any sound. Is there anyway to fix…
Kitcc
  • 2,138
  • 4
  • 24
  • 42
1
vote
1 answer

Updating Pomodoro Timer Value Doesn't Trigger Alarm Sound in Flutter Riverpod

I am currently working on a Pomodoro timer app using Flutter and Riverpod for state management. I have encountered a problem when I tried to update the default timer value from the settings page. Here is my current functionality: I have a Pomodoro…
caroch
  • 105
  • 5
1
vote
1 answer

Error: Bad state: Cannot add new events after calling close with just_audio and riverpod

I'm currently working on a Flutter application using the just_audio and flutter_riverpod packages. In my project, I've encountered an issue where I get an error message saying "Error: Bad state: Cannot add new events after calling close" originating…
caroch
  • 105
  • 5
1
vote
1 answer

Flutter just_audio package cannot file assets on Android

I am trying to play audio using just_audio package, It work on chrome but when I try on android it is not working I am getting this error: Caused by: com.google.android.exoplayer2.upstream.FileDataSource$FileDataSourceException:…
emre12345
  • 51
  • 5
1
vote
2 answers

Riverpod StateProvider not updating map values

I'm using a StateProvider from Riverpod, it's a Map because it's an app to play various sounds simultaneously with just_audio, and I'm matching the player instance with the specific sound assigned on that player in this one: final…
Uri PD
  • 33
  • 1
  • 7
1
vote
0 answers

How can I normalize audio track in flutter?

I am using Just Audio Player. I want to normalize song while playing. I tried using setVolume function but its only change the volume of the player. It does not normalize the song. What I want is a package that support audio normalizeation while…
1
vote
1 answer

Flutter Just Audio Background not playing audio when navigating to other screen

I am using just audio background package to play audio in the background. As you can see I am using the example code available on pub dev as I have just modified it. The problem is that the audio in the background stops when I navigate to another…
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
0 answers

Just Audio Background Package in Flutterflow

We are trying to implement the Just Audio background package within Flutterflow and it just crashes. My question is: Does anybody know of examples where the background package has been successfully implemented with Flutterflow? This way I can narrow…
Marc
  • 21
  • 2
1
vote
1 answer

Can't play audio files on iOS device, works on emulator

I keep getting this error when I try to play local audio files which are saved on a custom directory Error (-11849) Operation Stopped Stack #0 AudioPlayer._load (package:just_audio/just_audio.dart:850:9) #1 …
1
vote
1 answer

Apple doesn't accept submission of the app into the store using just_audio_background package for flutter

I followed the instructions on how to setup an app to use background audio from the just_audio_background package (https://pub.dev/packages/just_audio_background). Unfortunately in the next app submission to the store, apple declined it with the…
1
vote
0 answers

does anyone know what this warning means?

Does anyone know what this warning (not an error/exception) means? W/MetadataUtil( 7942): Failed to parse standard genre code Some audio files triggers this warning and no audio comes out for that particular file. just_aduio thinks its playing as…
Deedose
  • 13
  • 4