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
1
vote
1 answer

Just Audio play sound from a List of raw data

I'm trying to play audio from a stream of bytes in Flutter. I've used the Just Audio package's example on reading from a stream of bytes, and I'm still getting an error. The error is: Playback error E/ExoPlayerImplInternal(19173): …
Zachary Haslam
  • 103
  • 1
  • 12
1
vote
1 answer

Your Main Activity class com.ryanheise.audioservice.AudioServiceActivity is not a subclass FlutterFragmentActivity

I'm trying to create music app uses just_audio & just_audio_background plugins, App is working fine but I'm trying to integrate Stripe from flutter_stripe plugin. I get an exception when click on checkout button. its look like class…
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
vote
1 answer

How to handle errors thrown within AudioHandler implementations?

For the sake of the argument let's say I have an implementation of BaseAudioHandler in my application: class AudioPlayerHandler extends BaseAudioHandler { @override Future play() async { throw Error(); } } Then when I call…
1
vote
0 answers

How to add android auto support for an already existing Flutter application

I already have a music application built in Flutter. The music uses audio_service and just_audio. I am currently looking to add an Android Auto support for the music application built using Flutter. I have been going through the site…
1
vote
1 answer

Is there a way to eliminate the error when clicking the button fast

I have this code below which plays a sound every time I hit a button. AudioPlayer player = AudioPlayer(); Future playSound({required String soundStr}) async { player.setAsset(soundStr); player.play(); } But whenever I hit the button fast,…
Mr. Tacio
  • 442
  • 1
  • 7
  • 18
1
vote
0 answers

Just Audio for Flutter stops reproducing an mp3 file after some time for some reason (bufferpool2)

I'm just trying to reproduce a mp3 file placed in getApplicationDocumentsDirectory, using Just Audio library (just_audio: ^0.9.29), but after 43 seconds (for that specific file) the app crashes with the following log V/AutofillManager(24351):…
Donovant
  • 3,091
  • 8
  • 40
  • 68
1
vote
0 answers

(Flutter) How to update the AudioSource of a playlist using Just Audio keeping the shuffled order

I have a playlist generated with dummy source urls (it only has the source url of the playing audio and the others are fake) and when I click "next" I want to send an api request to get the real source url and update the sources of the playlist. If…
anon
  • 43
  • 1
  • 7
1
vote
1 answer

Сompletion playlist and resetting index in just_audio

I'm using the just_audio package, I have a playlist, and after playing all the tracks, the current index remains equal to the index of the last track. Is there a way to make the index equal to 0 when the playlist ends? final myPlayList =…
JM Apps
  • 150
  • 1
  • 7
1
vote
1 answer

Loading remote audio files (.wav) slower much slower on ios than on android when using this flutter package

Has anyone else found this? I'm using AudioSource.uri to get the remote audio source, then just using await player.play(); to play the remote audio file, on Android these audio files buffer and start playing a lot faster than on iOS where it takes…
Apperfect
  • 11
  • 1
1
vote
1 answer

Decreasing speed decreases sound quality

Decreasing the playback speed of AudioPlayer severely decreases the quality of the audio being played; the audio becomes very "noisy". Is there any way to fix this or is it an issue with the just_audio implementation? Reproduce: final AudioPlayer…
BeMain
  • 11
  • 3
1
vote
1 answer

Using Same AudioPlayer Again and Again

I want to use the same AudioPlayer instance for each play operation to avoid reloading assets each time. How can I achieve this? Currently, I've created an AudioPlayer instance like below. AudioPlayer _player = AudioPlayer(); await…
Burak
  • 11
  • 1
1
vote
1 answer

Flutter just_audio - seektoNext with LoopMode.one enabled

I would like to modify just_audio such that when LoopMode is set to LoopMode.one the seekToNext still goes to the next track in the playlist instead of repeating the same track. I would still want the track to repeat if it reaches the end without…
1
vote
1 answer

What to use instead of AudioPlaybackState, cannot find the documentation

I was looking at a clients app but I cannot find the solution. It was a really old code and I have updated the just_audio plugin to the latest version and i am getting errors in the code below I don't know what to do. I understand the mapping but I…
aneebhiba614
  • 33
  • 1
  • 5
1
vote
0 answers

Run example_radio.dart with JustAudioBackground

I'm experimenting with Ryan Heise's great audio packages in Flutter. I import the Just Audio Background ("JAB") code from GitHub into Android Studio, and I run flutter pub get where necessary to get rid of any errors in the packages. I want to…
Nick Paxford
  • 13
  • 2
  • 2