Commit eaa9487
0.16.0 (#88)
* Fix audio interruption resume and headphone disconnect cleanup
play(stationId:) now clears existing spin players before starting fresh,
preventing stale AVPlayers from being reused after audio interruptions.
Removed misleading interruption state saves from headphone disconnect
handler and dead isSuspended property. Added scheduleFetcher injection
for testability and 8 new tests covering all interruption codepaths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add testability comments to internal-for-testing members
* Revert to 0.14.0 and document streaming approach
Revert all source code to the stable 0.14.0 state, removing the
streaming player port (0.15.0) which introduced issues. Add
STREAMING_APPROACH.md documenting the AVPlayer-based streaming
architecture for future reference.
* Fix app hang by awaiting audio session before engine start (#87)
* Fix app hang by awaiting audio session before engine start
The Sentry hang (2000ms+) was caused by AVAudioEngine.start() being
called before the audio session was configured. configureAudioSession()
fired a Task (fire-and-forget) then engine.start() ran immediately,
causing the engine to stall on the main thread.
Add ensureAudioSessionConfigured() async method to PlayolaMainMixer
and await it in handleSuccessfulDownload before playback begins. Also
remove the Thread.sleep retry loop from start() which was masking the
unconfigured session issue while blocking the main thread.
* Handle audio session config failure and add precondition asserts
Replace try? with proper error handling in handleSuccessfulDownload so
a failed audio session config bails out instead of proceeding to
engine.start() with an unconfigured session.
Add assertions in playNow and prepareAudioEngine to catch direct
callers that skip ensureAudioSessionConfigured().
* Add .context to .gitignore
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent b2f872f commit eaa9487
16 files changed
Lines changed: 278 additions & 1937 deletions
File tree
- PlayolaPlayerExample/PlayolaPlayerExample
- Sources/PlayolaPlayer/Player
- Streaming
- Tests/PlayolaPlayerTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
0 commit comments