3pillarlabs/ios-audio-player

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

Homepage:

Size: 47583

Language: Makefile

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

iOS Audio Player

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:

Installation

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.

Carthage

Run Terminal

ub "3pillarlabs/ios-audio-player"
hage update
Usage
  1. Import iOSAudioPlayer Framework

  2. Use shared instance of TPGAudioPlayer class, by calling TPGAudioPlayer.sharedInstance().

  3. Play a certain media file by calling method:

  4.   public func playPauseMediaFile(audioUrl: NSURL, springboardInfo: [String : AnyObject], startTime: Double, completion: (previousItem: String?, stopTime: Double) -> ())
    
  5. Skip a certain time interval using method:

  6.   public func skipDirection(skipDirection: iOSAudioPlayer.SkipDirection, timeInterval: Double, offset: Double)
    
  7. Seek the player to a certain offset:

  8.   public func seekPlayerToTime(value: Double, completion: (() -> Void)!)
    
  9. Check the duration of the current player item:

  10.   public var durationInSeconds: Double { get }
    
  11. Check current progress of the player on the current player item:

  12.   public var currentTimeInSeconds: Double { get }
    
  13. Listen to the notification which is triggered when a certain media file package is loaded:

  14.   public let TPGMediaLoadedStateNotification: String
    

In the demo project you're able to see how the framework is used.

License

iOSAudioPlayer is released under MIT license. See LICENSE for details.

About this project

3Pillar Global

iOSAudioPlayer is developed and maintained by 3Pillar Global.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.