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
3
votes
2 answers

Can't play sound in Flutter Android using just_audio

So, I'm trying to have this sound from Flutter assets when I click the button. And I've tried many different packages by this moment and none of them seems to work for me. I'm constantly getting this: D/ViewRootImpl( 8796):…
AlexAverin
  • 31
  • 3
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
3
votes
0 answers

How to change audio source while the player is playing using just_audio flutter?

My use case is that I have an mp3 file playing in the background that uses audio_service and just_audio packages in flutter. Let's say the file is 'A'. My app lets 'A' download from url to local file while playing 'A' from url (a separate background…
immadisairaj
  • 608
  • 4
  • 11
3
votes
1 answer

How to stream mp3 file with extra info after extension in just_audio

I am using just_audio in flutter to play audio files. All is lovely, except that just_audio uses the file-name extension to determine the file type. Therefore, if your URL does not end with the appropriate few characters, then you cannot play the…
Neill Bowler
  • 145
  • 1
  • 10
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
1 answer

How to play audio with the workmanager package using Flutter?

I want to play 1 (or more) scheduled short audio bells in the executeTask callback from the workmanager package when the user puts in the app in the background. executeTask callback always fires when it should. However -- the audio does not play…
Kdon
  • 892
  • 6
  • 19
2
votes
0 answers

Flutter just_audio : type 'MediaItem' is not a subtype of type 'String?' in type cast

I receive tracs from API and put them to a list . I want to add tracks to Audio Player then I write my code like bellow playlist = ConcatenatingAudioSource( children: [ ClippingAudioSource( child:…
MMSH
  • 59
  • 9
2
votes
0 answers

how to set Just audio backgroud notification audio artwork using the local audio file image uri = content://

So I am trying to display an audio artwork in the notification panel on Android, but I don't seem to know how to get it to work out right. In the example on the pub.dev site, it used an image URL for the notification artwork, and this was the code…
2
votes
1 answer

How to show artMusic on Media control (Notification) from assets file in flutter

I am using Just Audio and Just Audio Background for playing music and media control on Notification. I am able to show album, title of storage songs on Notification control but unable to show artmusic of music on Notification. I am using on Audio…
2
votes
0 answers

Video player on flutter web with local dart server

I have a local dart server, serving music and videos. I tested it with android device and a flutter application and it worked with just_audio and video_player packages after adding this line in…
Amr Hassan
  • 160
  • 8
2
votes
0 answers

What are supported file formats for just_audio 0.9.29 Flutter Package

I am doing a project and planning to use just_audio 0.9.29 Flutter package, but I could not find list of supported file formats in documentation. Where can I find this information?
Mohit
  • 21
  • 2
2
votes
1 answer

Flutter just_audion : check if media file is cached

I'm using just_audio to play and cache medias. How can I check if the media is in just_audio cache directory, before I start playing it? Thanks.
Cbeeapps
  • 21
  • 1
  • 2
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
1 answer

flutter: Continuous buffering consuming data even when stream is not set to play [just_audio]

Describe the bug I am taking the example given here https://pub.dev/packages/just_audio#-example-tab- I am having a Live Stream audio, as soon as the UI is loaded, the app keeps buffering the stream in background all the time. Hence consuming data.…
2
votes
1 answer

Audio on Android works normally, but when I play it on ios it gives this error knowing that the audio url is from firebase

error : flutter: (-11828) Cannot Open flutter: #0 AudioPlayer._load (package:just_audio/just_audio.dart:840:9) #1 AudioPlayer._setPlatformActive.setPlatform (package:just_audio/just_audio.dart:1421:28) #2 AudioPlayer.play…
Rami
  • 21
  • 4
1
2
3
19 20