Checklist
Current bug behaviour
^[[31mAudioPlayers Exception: AudioPlayerException(
DeviceFileSource(path: /var/mobile/Containers/Data/Application/05BFE1FD-0371-4C27-A279-38645C04E5C3/Library/Caches/recording.aac),
PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, null, null)<…>
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, null, null)
Expected behaviour
await _player.setSourceDeviceFile(fileUrl);
_player.play(source);
Steps to reproduce
- Execute
flutter run on the code sample
- ...
- ...
Code sample
void playAudioWithFile(String fileUrl,
{Function? onPlaying, Function? onPlayCompleted}) async{
this.onPlaying = onPlaying;
this.onPlayCompleted = onPlayCompleted;
DeviceFileSource source = DeviceFileSource(fileUrl);
await _player.setSourceDeviceFile(fileUrl);
_player.play(source);
}
Affected platforms
iOS
Platform details
Android 正常
ios 报错
AudioPlayers Version
audioplayers: ^4.1.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
No response
Working on PR
no way
Checklist
Current bug behaviour
^[[31mAudioPlayers Exception: AudioPlayerException(
DeviceFileSource(path: /var/mobile/Containers/Data/Application/05BFE1FD-0371-4C27-A279-38645C04E5C3/Library/Caches/recording.aac),
PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, null, null)<…>
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(DarwinAudioError, AVPlayerItem.Status.failed on setSourceUrl, null, null)
Expected behaviour
await _player.setSourceDeviceFile(fileUrl);
_player.play(source);
Steps to reproduce
flutter runon the code sampleCode sample
Affected platforms
iOS
Platform details
Android 正常
ios 报错
AudioPlayers Version
audioplayers: ^4.1.0
Build mode
debug
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Full Logs
Flutter doctor:
Related issues / more information
No response
Working on PR
no way