iOS Audio player 🔈 uses AVQueuePlayer
- play background audio and handle MPRemoteCommandCenter actions.
- next track, previous track, go to specific track, skip interval (forward/backward), change playback rate, ...
let playerManager = AQPlayerManager.shared
Initialize player items and setup the player manager
var playeritems: [AQPlayerItemInfo] = []
// for each audio file
let item = AQPlayerItemInfo(id: fileId,
url: audioUrl,
title: "part_title",
albumTitle: "albumTitle",
coverImage: nil,
startAt: 0)
playeritems.append(item)
playerManager.setup(with: playeritems, startFrom: 0, playAfterSetup: false)
Command Center Art work image can be set during initilization of the item using (URL or UIImage), or through the delegate method getCoverImage
To install using CocoaPods, add the following to your Podfile:
pod 'AQPlayer'
Check the Example in the project for full fuctioning demo
clone the repo, and run pod install
from the Example directory first.
- swift 4.2
- iOS 11.0+
AQPlayer is available under the MIT license. See the LICENSE file for more info.