Open vinh-savvycom opened 1 year ago
Faced Same issue
I get same issue, how to fix it?
Hi there. Did you read the troubleshooting guide? Did you searched the other issues?
@Gustl22 yes, I have added all permission IOS but still getting issue UrlSource(url: https://thonn.mthana.shop/91a3c69bef6a9383e01df5e38e7db720.mp3), PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)<…> [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null) [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null) [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)
i try with url: https://www.kozco.com/tech/piano2-CoolEdit.mp3 and it's working well
@thonn96 thats because there is no file here: https://thonn.mthana.shop/91a3c69bef6a9383e01df5e38e7db720.mp3
You can check your file format also with this tool: https://www.aconvert.com/analyze.html
And also always use Code blocks for code and logs.
@vinh-savvycom You are missing an s
in http://
. The url in without s
is just a scripted forwarding, so it doesn't actually work.
@Gustl22 Sorry for mistake, I using this url: https://thonn.mthana.shop/static/91a3c69bef6a9383e01df5e38e7db720.mp3, and it's not working
@thonn96 have you checked the url with this tool? https://www.aconvert.com/analyze.html Does apple support this file format or maybe it's just labeled wrong?
@Gustl22 I have put 91a3c69bef6a9383e01df5e38e7db720.mp3 in the assets file and it's working well, I paste the URL to Safari and it's working, and i use the tool https://www.aconvert.com/analyze.html to convert new URLs and it's working well, but if I use this https://thonn.mthana.shop/static/91a3c69bef6a9383e01df5e38e7db720.mp3 : it's not working, could you show me how to check the format or label of the audio. this is the format audio: and i see an error: FileExtension_Invalid : act at9 wav. is it the root cause? i have updated file audio to 2 channels but it's not working: this is new urls: https://thonn.mthana.shop/static/166e08fea6ff037a3769b1aea0fb41f0_stereo.wav
UrlSource(url: https://thonn.mthana.shop/static/166e08fea6ff037a3769b1aea0fb41f0_stereo.wav), PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)<…>
@thonn96 your url is again not valid. Also if you have questions and need help, better ask in our Discord server: https://discord.com/channels/509714518008528896/533299043686940692 . When I checked the url back then, the format was WAV Riff, which is probably not supported by Apple, but there are plenty of converters out there or use VLC or ffmpeg. Also the file extension must match the format. Please don't delete or change any files, it makes it hard to validate any of your findings. See also #803 .
Again also use code blocks for error messages or logs!
@Gustl22 i can't join Discord server: https://discord.com/channels/509714518008528896/533299043686940692.
my account is thonn96, could you allow to access this group
@thonn96 the invite link is in the readme. This was only the link to the according channel.
@Gustl22 Thank you for your support, I have resolved this issue. but i got a new issue onDurationChanged not working on IOS. how to fix this issue? i post messages in the discord but don't get the answer
Checklist
Current bug behaviour
I tried to play remote url mp3 but I have this error message AudioPlayers Exception: AudioPlayerException( UrlSource(url: http://cdn.mos.musicradar.com/audio/samples/80s-heat-demos/AM_Eighties08_85-01.mp3), PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)<…> [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)
Expected behaviour
Please help me play remote url
Steps to reproduce
flutter run
on the code sampleCode sample
Code sample
```dart FutureAffected platforms
iOS
Platform details
No response
AudioPlayers Version
5.2.0
Build mode
debug
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Full Logs
``` AudioPlayers Exception: AudioPlayerException( UrlSource(url: http://cdn.mos.musicradar.com/audio/samples/80s-heat-demos/AM_Eighties08_85-01.mp3), PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null)<…> [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl, null) ``` Flutter doctor: ``` Output of: flutter doctor -v ```Related issues / more information
No response
Working on PR
no way