dtran320 / AQPlayer

Swift iOS Audio player :speaker: using AVQueuePlayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AQPlayer

iOS Audio player 🔈 uses AVQueuePlayer

AQPlayer command center skip mode command center next previous mode

  • play background audio and handle MPRemoteCommandCenter actions.
  • next track, previous track, go to specific track, skip interval (forward/backward), change playback rate, ...

Usage:

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

Install

CocoaPods

To install using CocoaPods, add the following to your Podfile:

pod 'AQPlayer'

Example

Check the Example in the project for full fuctioning demo

clone the repo, and run pod install from the Example directory first.

Requirements

  • swift 4.2
  • iOS 11.0+

License

AQPlayer is available under the MIT license. See the LICENSE file for more info.

About

Swift iOS Audio player :speaker: using AVQueuePlayer

License:MIT License


Languages

Language:Swift 96.1%Language:Ruby 3.9%