I verified with this option removed AirPlay still functions, and the error is also gone.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/334
**Author:** [@ronaldheft](https://github.com/ronaldheft)
**Created:** 8/27/2022
**Status:** ✅ Merged
**Merged:** 8/27/2022
**Merged by:** [@advplyr](https://github.com/advplyr)
**Base:** `master` ← **Head:** `ios-failed-playback-session`
---
### 📝 Commits (1)
- [`66ab402`](https://github.com/advplyr/audiobookshelf-app/commit/66ab402a50935540a511aa55550436daf78ad952) Fix failed playback session on initAudioSession
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `ios/App/Shared/player/AudioPlayer.swift` (+1 -1)
</details>
### 📄 Description
I occasionally see the following error when run on my device, which does not appear on the simulator:
```
Failed to set AVAudioSession category
Error Domain=NSOSStatusErrorDomain Code=2003329396
```
It turns out the call to `AVAudioSession.sharedInstance().setCategory` does not need the `.allowAirPlay` option. That option [is only valid when the category is `.playAndRecord`](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1771736-allowairplay).
I verified with this option removed AirPlay still functions, and the error is also gone.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/334
Author: @ronaldheft
Created: 8/27/2022
Status: ✅ Merged
Merged: 8/27/2022
Merged by: @advplyr
Base:
master← Head:ios-failed-playback-session📝 Commits (1)
66ab402Fix failed playback session on initAudioSession📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
ios/App/Shared/player/AudioPlayer.swift(+1 -1)📄 Description
I occasionally see the following error when run on my device, which does not appear on the simulator:
It turns out the call to
AVAudioSession.sharedInstance().setCategorydoes not need the.allowAirPlayoption. That option is only valid when the category is.playAndRecord.I verified with this option removed AirPlay still functions, and the error is also gone.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.