-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
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
Audiplayer failed to set DeviceFileSource: PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, Failed to set source. For troubleshooting, see " + "https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md) #1744
Comments
same issue happening with me |
It also throws the same error for me on IOS only on the latest version of the package void playAudio(){
final audioRef = storage.ref().child(filePath);
String url = await audioRef.getDownloadURL();
await audioPlayer.play(DeviceFileSource(url)).onError((error, stackTrace) => throw Exception("Failed to play Local audio $error"));
} Error
Flutter doctor
|
did you find the solution for this?? |
same here on macOS 14.4.1, Flutter 3.19.6, Flame 1.17.0, Flame Audio 2.10.1
|
have you found any soluttion about this issue. i am also facing this issue. but i am facing this issue on using datatfilesource method. |
I don't know if this is the same usecase, I encountered this issue a while back. my usecase was recording and playing the audio. the recorded audio was getting encoded in .caf extension and I was trying to play it with .wav extension. So you may want to check whether the audio is of proper format as you want t to be or not |
my recorded audio is wav format and tryy to play in same format, but still got error
|
@adnan-haider007 if you're using AudioRecorder then make sure to add .wav extension at the end of file path that you are passing to the start method. It gets recorded in .caf even if you specify AudioEncoder.wav explicitly. If you're already doing it then can't help you sorry. |
I had the same issue and i faced maybe a weird bug? I fixed it with this line of code before calling the AudioPlayer:
Im doing a Flutter App for web so i checked the network console and i saw an error getting my mp3 File
I wondered why the path includes the name assets twice because my implementation looks like this:
Final result:
|
@Nmxsz see AudioCache. Having twice the You will notice, if you run For more infos, see this comment: flutter/flutter#86833 (comment) |
This worked perfectly for me, thanks a lot! |
Checklist
Current bug behaviour
My code is as follows:
But it still throws the PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, Failed to set source. For troubleshooting, see "
I have also copied the code from the demo/examples and tried to play the same file as well but no luck with both plugins.
If anyone has an idea, please guide me. I am clueless.
Currently works smoothly on Android but not on iOS
Expected behaviour
It should be working flawlessly on iOS as the same code works on Android
Steps to reproduce
No response
Code sample
No response
Affected platforms
iOS
Platform details
Xcode iOS simulator iPhone 15 Pro max(iOS 17.2)
Physical device iPhone 12 pro (iOS 17.2.1)
AudioPlayers Version
5.2.1
Build mode
debug, release
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
No response
Related issues / more information
No response
Working on PR
no way
The text was updated successfully, but these errors were encountered: