{"id":13905861,"url":"https://github.com/fethica/FRadioPlayer","last_synced_at":"2025-07-18T03:32:23.942Z","repository":{"id":39351691,"uuid":"112964383","full_name":"fethica/FRadioPlayer","owner":"fethica","description":"A simple radio player framework for iOS, macOS, tvOS.","archived":false,"fork":false,"pushed_at":"2024-02-25T04:38:03.000Z","size":815,"stargazers_count":283,"open_issues_count":15,"forks_count":59,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-16T05:09:50.450Z","etag":null,"topics":["album-artwork","audio","audio-library","audio-player","avplayer","cocoapods","ios","ios-swift","itunes-api","music","player","radio","radio-player","radio-station","radio-url","swift"],"latest_commit_sha":null,"homepage":"https://fethica.github.io/FRadioPlayer/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fethica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["fethica"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/fethicaEH"]}},"created_at":"2017-12-03T21:15:52.000Z","updated_at":"2024-10-10T15:13:47.000Z","dependencies_parsed_at":"2024-02-25T05:24:02.090Z","dependency_job_id":"956ea8c9-a941-4dd9-8ab3-29cfea00abfa","html_url":"https://github.com/fethica/FRadioPlayer","commit_stats":{"total_commits":156,"total_committers":10,"mean_commits":15.6,"dds":"0.23076923076923073","last_synced_commit":"34ac9e399ce1268a03a05f989148cca5084978d6"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fethica%2FFRadioPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fethica%2FFRadioPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fethica%2FFRadioPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fethica%2FFRadioPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fethica","download_url":"https://codeload.github.com/fethica/FRadioPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226027840,"owners_count":17562139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["album-artwork","audio","audio-library","audio-player","avplayer","cocoapods","ios","ios-swift","itunes-api","music","player","radio","radio-player","radio-station","radio-url","swift"],"created_at":"2024-08-06T23:01:25.165Z","updated_at":"2024-11-25T14:30:27.497Z","avatar_url":"https://github.com/fethica.png","language":"Swift","funding_links":["https://github.com/sponsors/fethica","https://www.paypal.me/fethicaEH"],"categories":["HarmonyOS","OOM-Leaks-Crash"],"sub_categories":["Windows Manager","Player"],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg alt=\"FRadioPlayer\" src=\"https://fethica.com/assets/img/web/repo-hero.png\" width=\"749\"\u003e\n\u003c/p\u003e\n\n# FRadioPlayer\n\n[![CI Status](https://github.com/fethica/FRadioPlayer/workflows/Swift/badge.svg)](https://github.com/fethica/FRadioPlayer/actions?query=workflow%3ASwift)\n[![CI Status](http://img.shields.io/travis/fethica/FRadioPlayer.svg?style=flat)](https://travis-ci.org/fethica/FRadioPlayer)\n[![Version](https://img.shields.io/cocoapods/v/FRadioPlayer.svg?style=flat)](http://cocoapods.org/pods/FRadioPlayer)\n[![License](https://img.shields.io/cocoapods/l/FRadioPlayer.svg?style=flat)](http://cocoapods.org/pods/FRadioPlayer)\n[![Platform](https://img.shields.io/cocoapods/p/FRadioPlayer.svg?style=flat)](http://cocoapods.org/pods/FRadioPlayer)\n\nFRadioPlayer is a wrapper around AVPlayer to handle internet radio playback.\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"FRadioPlayer\" src=\"https://fethica.com/assets/img/web/fradioplayer-example.png\" width=\"485\"\u003e\n\u003c/p\u003e\n\n## Features\n- [x] Support internet radio URL playback\n- [x] Update and parse track metadata\n- [x] Update and show album artwork (via iTunes API)\n- [x] Automatic handling of interruptions\n- [x] Automatic handling of route changes\n- [x] Support bluetooth playback\n- [x] Swift 5\n- [x] [Full documentation](https://fethica.github.io/FRadioPlayer/)\n- [x] Network interruptions handling\n- [x] Support for Carthage\n- [x] Support for macOS\n- [x] Support for tvOS\n- [x] Support for Swift Package Manager SPM\n- [ ] Support for Audio Taps\n- [ ] Support for Audio Recording\n\n## Requirements\n- macOS 10.12+\n- iOS 10.0+\n- tvOS 10.0+\n- Xcode 10.2+\n- Swift 5\n\n## Installation\n\n### CocoaPods\n\nFRadioPlayer is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'FRadioPlayer'\n```\n\n### Carthage\n\nFRadioPlayer is available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your Cartfile:\n\n```text\ngithub \"fethica/FRadioPlayer\" ~\u003e 0.1.10\n```\n\n### Swift Package Manager\n\nFRadioPlayer is available through [SPM](https://github.com/apple/swift-package-manager). To install it, simply add the following dependency to your `Package.swift` file:\n\n```text\n.package(url: \"https://github.com/fethica/FRadioPlayer.git\", from: \"0.1.18\")\n```\n\n### Manual\n\nDrag the `Source` folder into your project.\n\n## Usage\n\n### Basics\n\n1. Import `FRadioPlayer` (if you are using Cocoapods)\n\n```swift\nimport FRadioPlayer\n```\n\n2. Get the singleton `FRadioPlayer` instance\n\n```swift\nlet player = FRadioPlayer.shared\n```\n\n3. Set the delegate for the player\n\n```swift\nplayer.delegate = self\n```\n\n4. Set the radio URL\n```swift\nplayer.radioURL = URL(string: \"http://example.com/station.mp3\")\n```\n\n### Properties\n\n- `isAutoPlay: Bool` The player starts playing when the `radioURL` property gets set. (default == `true`)\n\n- `enableArtwork: Bool` Enable fetching albums artwork from the iTunes API. (default == `true`)\n\n- `artworkSize: Int` Artwork image size. (default == `100` | 100x100).\n\n- `rate: Float?` Read only property to get the current `AVPlayer` rate.\n\n- `isPlaying: Bool` Read only property to check if the player is playing.\n\n- `state: FRadioPlayerState` Player current state of type `FRadioPlayerState`.\n\n- `playbackState: FRadioPlaybackState` Playing state of type `FRadioPlaybackState`.\n\n### Playback controls\n\n- Play\n```swift\nplayer.play()\n```\n\n- Pause\n```swift\nplayer.pause()\n```\n\n- Stop\n```swift\nplayer.stop()\n```\n\n- Toggle playing state\n```swift\nplayer.togglePlaying()\n```\n\n### Delegate methods\n\nCalled when player changes state\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, playerStateDidChange state: FRadioPlayerState)\n```\n\nCalled when the playback changes state\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, playbackStateDidChange state: FRadioPlaybackState)\n```\n\nCalled when player changes the current player item\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, itemDidChange url: URL?)\n```\n\nCalled when player item changes the timed metadata value\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, metadataDidChange artistName: String?, trackName: String?)\n```\n\nCalled when player item changes the timed metadata value\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, metadataDidChange rawValue: String?)\n```\n\nCalled when the player gets the artwork for the playing song\n```swift\nfunc radioPlayer(_ player: FRadioPlayer, artworkDidChange artworkURL: URL?)\n```\n\n## Swift Radio App\n\nFor more complete app features, check out [Swift Radio App](https://github.com/analogcode/Swift-Radio-Pro) based on **FRadioPlayer**\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Swift Radio\" src=\"https://fethica.com/assets/img/web/swift-radio.jpg\"\u003e\n\u003c/p\u003e\n\n## Hacking\n\nThe Xcode project is generated automatically from `project.yml` using [XcodeGen](https://github.com/yonaskolb/XcodeGen). It's only checked in because Carthage needs it, do not edit it manually.\n\n```sh\n$ mint run yonaskolb/xcodegen\n💾  Saved project to FRadioPlayer.xcodeproj\n```\n\n## Author\n\n[Fethi El Hassasna](https://twitter.com/fethica)\n\n## License\n\nFRadioPlayer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffethica%2FFRadioPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffethica%2FFRadioPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffethica%2FFRadioPlayer/lists"}