Name: ios-audio-player
Owner: 3Pillar Global Open Source
Description: iOSAudioPlayer is a Swift based iOS module that provides player control features.
Created: 2016-01-15 07:52:06.0
Updated: 2017-08-17 05:47:56.0
Pushed: 2016-12-27 11:08:49.0
Size: 47583
Language: Makefile
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
iOSAudioPlayer is a Swift based iOS module that provides player control features. This module represents a wrapper over AVPlayer. It is available starting with iOS 8.
Project Rationale
The purpose of the framework is to provide a simple in app solution for player controls, by offering the following features:
iOSAudioPlayer framework works with iOS 9.0 or later. Make sure that the framework is added to 'Embedded Binaries' list. After this, you just import the framework in the file where you will use it.
Run Terminal
ub "3pillarlabs/ios-audio-player"
hage update
Import iOSAudioPlayer Framework
Use shared instance of TPGAudioPlayer class, by calling TPGAudioPlayer.sharedInstance().
Play a certain media file by calling method:
public func playPauseMediaFile(audioUrl: NSURL, springboardInfo: [String : AnyObject], startTime: Double, completion: (previousItem: String?, stopTime: Double) -> ())
Skip a certain time interval using method:
public func skipDirection(skipDirection: iOSAudioPlayer.SkipDirection, timeInterval: Double, offset: Double)
Seek the player to a certain offset:
public func seekPlayerToTime(value: Double, completion: (() -> Void)!)
Check the duration of the current player item:
public var durationInSeconds: Double { get }
Check current progress of the player on the current player item:
public var currentTimeInSeconds: Double { get }
Listen to the notification which is triggered when a certain media file package is loaded:
public let TPGMediaLoadedStateNotification: String
In the demo project you're able to see how the framework is used.
iOSAudioPlayer is released under MIT license. See LICENSE for details.
iOSAudioPlayer is developed and maintained by 3Pillar Global.