Skip to content

Releases: fethica/FRadioPlayer

Simplified audio session options

17 Sep 00:43
243cd92

Choose a tag to compare

  • Simplified audio session options: options = [.allowAirPlay, .allowBluetoothA2DP]
  • iOS minimum bumped to .iOS(.v15)

Migrate delegate callbacks to an observer pattern

15 Sep 01:10
0a0e0e4

Choose a tag to compare

Highlights

  • API: Switched from delegate callbacks to an observer pattern (one-to-many). Implement FRadioPlayerObserver and call addObserver/removeObserver.
  • Streams: Added support for non-live (file) streams with duration/currentTime updates, seeking, and more robust state handling.
  • Packaging: SPM-only. Removed CocoaPods/Carthage files and Travis CI.
  • Swift version: Bumped to Swift tools 5.5 (Xcode 13+).
  • Demo app: Revamped SwiftUI-only demo (iOS 15+):
    • Reorganized into Views/Models/Resources; cleaner UI; uses AsyncImage for artwork.
    • Generated with XcodeGen (no .xcodeproj in repo).
  • CI: Added GitHub Actions
    • spm.yml builds and tests the library.
    • demo.yml generates (XcodeGen) and builds the demo.

Migration notes (delegate → observers)

  • Before (delegate, one-to-one):
    player.delegate = self
  • Now (observers, one-to-many):
    player.addObserver(self) // conform to FRadioPlayerObserver
    // optionally: player.removeObserver(self)

Observer callbacks to implement

  • radioPlayer(_:playerStateDidChange:)
  • radioPlayer(_:playbackStateDidChange:)
  • radioPlayer(_:itemDidChange:)
  • radioPlayer(_:metadataDidChange:)
  • radioPlayer(_:artworkDidChange:)
  • radioPlayer(_:durationDidChange:)
  • radioPlayer(_:playTimeDidChange:duration:)

✨Add HTTP header fields support

25 Jan 03:19

Choose a tag to compare

  • Change AVAsset to AVURLAsset.
  • Add httpHeaderFields property to set HTTP headers, example:
FRadioPlayer.shared.httpHeaderFields = ["user-agent": "FRadioPlayer"]

SwiftUI Example and Metadata improvements

10 Dec 01:29

Choose a tag to compare

  • Add a new target with SwiftUI example for iOS and macOS 🚀
  • Metadata retrieval improvements ✨

Big thanks to @urayoanm for adding this new features 🎸

Enhanced metadata validators

05 Apr 02:39

Choose a tag to compare

Improve the metadata validation by @nicolassrod

Add metadata cleanup

19 Jul 12:21

Choose a tag to compare

Add a helper function to strip off trailing '[???]' characters left there by ShoutCast and Centova Streams.
Thanks to @cbarriga for this feature.

Swift 5 / Xcode 10.2

20 May 04:01

Choose a tag to compare

  • Add Swift 5 and Xcode 10.2 support.
  • Upgrade to Cocoapods 1.6.

Add tvOS support 📺

03 Dec 18:08

Choose a tag to compare

Add tvOS support by @sbrighiu 🎉

Fix Carthage

30 Nov 03:10

Choose a tag to compare

0.1.14

Update version

Add macOS support  🖥

29 Nov 03:02

Choose a tag to compare

Add macOS support by @misteral 🎉