Checklist
Current bug behaviour
After update to ios 17, play() function fails with following exception. However the same code was working fine in android as well as ios 16.
[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)
Any .mp3 file with following code produces the above exception
AudioPlayer.global.setAudioContext(AudioContextConfig().build());
final player = AudioPlayer();
ByteData res = await rootBundle.load('assets/test.mp3');
await player.play(UrlSource(Uri.dataFromBytes(res.buffer.asUint8List(), mimeType: "audio/mpeg").toString()), volume: 1);
Expected behaviour
Play the .mp3 file
Steps to reproduce
- Execute
flutter run on the code sample
- ...
- ...
Code sample
Code sample
Affected platforms
iOS
Platform details
iOS 17
AudioPlayers Version
5.0.0
Build mode
debug
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Full Logs
my full logs or a link to a gist
Flutter doctor:
Output of: flutter doctor -v
Related issues / more information
Problem is with UrlSource. When using asset source on iOS 17, it is working fine.
e.g. -
player.play(AssetSource('test.mp3'));
Working on PR
no way
Checklist
Current bug behaviour
After update to ios 17, play() function fails with following exception. However the same code was working fine in android as well as ios 16.
[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)
Any .mp3 file with following code produces the above exception
Expected behaviour
Play the .mp3 file
Steps to reproduce
flutter runon the code sampleCode sample
Code sample
Affected platforms
iOS
Platform details
iOS 17
AudioPlayers Version
5.0.0
Build mode
debug
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Full Logs
Flutter doctor:
Related issues / more information
Problem is with UrlSource. When using asset source on iOS 17, it is working fine.
e.g. -
player.play(AssetSource('test.mp3'));
Working on PR
no way