CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Gabriel Dusa.
iOSAudioPlayer is a Swift based iOS module that provides player control features. This module represents a wrapper over AVPlayer.
Project Rationale
The purpose of the framework is to provide a simple in app solution for player controls, by offering the following features:
If you prefer not to use CocoaPods, you can integrate iOSAudioPlayer into your project manually.
cd
into your top-level project directory, and run the following command “if” your project is not initialized as a git repository:$ git init
$ git submodule add hhttps://github.com/3pillarlabs/ios-audio-player.git
iOSAudioPlayer
folder, and drag the iOSAudioPlayer.xcodeproj
into the Project Navigator of your application’s Xcode project.It should appear nested underneath your application’s blue project icon. Whether it is above or below all the other Xcode groups does not matter.
iOSAudioPlayer.xcodeproj
in the Project Navigator and verify the deployment target matches that of your application target.+
button under the “Embedded Binaries” section.iOSAudioPlayer.xcodeproj
folders each with two different versions of the iOSAudioPlayer.framework
nested inside a Products
folder.It does not matter which
Products
folder you choose from, but it does matter whether you choose the top or bottomiOSAudioPlayer.framework
.
Select the top iOSAudioPlayer.framework
for iOS.
And that’s it!
The
iOSAudioPlayer.framework
is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
If you prefer to rock it old-school, iOSAudioPlayer can be integrated by adding all the Swift files located inside the Classes
directory (Classes/*.*
) directly into your project. Note that you will no longer need to import iOSAudioPlayer
since you are not actually loading a framework.
public func playPauseMediaFile(audioUrl: NSURL, springboardInfo: [String : AnyObject], startTime: Double, completion: (previousItem: String?, stopTime: Double) -> ())
public func skipDirection(skipDirection: iOSAudioPlayer.SkipDirection, timeInterval: Double, offset: Double)
public func seekPlayerToTime(value: Double, completion: (() -> Void)!)
public var durationInSeconds: Double { get }
public var currentTimeInSeconds: Double { get }
public let TPGMediaLoadedStateNotification: String
In the “Example for iOSAudioPlayer” project you’re able to see how the framework is used.
iOSAudioPlayer is developed and maintained by 3Pillar Global.
iOSAudioPlayer is available under the MIT license. See the LICENSE file for more info.