Closed talent-apps closed 7 months ago
yes thats happening
Does this also happen, if you await
setAudioContext
and then play?
@Gustl22 That seems to resolve the issue. Thanks.
no still happening after setting setAudioContext PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl: Unknown error, null)<…> [ERROR:flutter/runtime/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: Unknown error, null)
its working fine in android issue comes in iOS
@sandeep-kadyangc1 then its probably another issue. Can you open a full bug report please?
that solved.. it was problem with my simulator
Checklist
Current bug behaviour
After upgrading to
audioplayers: ^6.0.0
we see multiple crashes on the crashlytics dashboard:The crashes occur on multiple devices, for example Galaxy A03 Core, Galaxy A13, Redmi 9A.
Expected behaviour
No crash
Code sample
Code sample
```dart static void playApplauseSound() { AudioPlayer() ..setAudioContext( AudioContext( android: const AudioContextAndroid(audioFocus: AndroidAudioFocus.gainTransientMayDuck), iOS: AudioContextIOS(options: const {AVAudioSessionOptions.duckOthers}), ), ) ..play(AssetSource('sounds/example.mp3')); } ```Affected platforms
Android
Platform details
No response
AudioPlayers Version
6.0.0