-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
We are using this to play short sound clips (mostly as notifications). Because we are playing the same clips we have been caching the player after creating it once. This works fine on android which ends the audio session properly, however, iOS does not end the session and it appears that there is no way (other than disposing of the player) to end the audio session and allow other apps to resume playing audio.
We can work around this for now by always disposing on iOS, but it would be nice to share the behaviour.
I think the fix for this is to add an additional flag to AudioPlayerOptions.macios.cs to control this behaviour, and then to initialise the session on Play, and finish the session on Pause/Stop/Finish.
I have applied a possible fix for this into a local branch, but am unsure how to contribute to this project, so have attached a patch file below instead.
0001-Added-option-to-allow-for-audio-session-to-be-dynami.patch