Latest 0.1.2
Homepage https://github.com/heilb1314/JWMediaManager
License MIT
Platforms ios 8.0
Frameworks AVFoundation
Authors

Build Status
Version
License
Platform

Example

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

Requirements

  • iOS 8.0+
  • XCode 8.1+
  • Swift 3.0+

Installation

JWMediaManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "JWMediaManager"

Usage

import JWMediaManager

Add MediaPlayerManagerDelegate to your class.

Create a manager instance

var mediaManager = MediaPlayerManager()

Make sure assign delegate mediaManager.delegate = self

Set playlist and/or play index

mediaManager.setPlayer(with: playlist, playAt: index)

Support 3 Different play modes

  • PlayMode.loop Play continuously in order
  • PlayMode.one Repeat single one
  • PlayMode.shuffle Shuffle playlist.

MediaPlayerManagerDelegate

  • Continuously play time update

    func mediaPlayerPlayTimeDidChange(sender: MediaPlayerManager, time: Double) {
    // update current time
    }
  • PlayerItem duration change

    func mediaPlayerDurationDidChange(sender: MediaPlayerManager, duration: Double) {
    // update duration
    }
  • PlayerItem already downloaded duration change

    func mediaPlayerAvailableDurationDidChange(sender: MediaPlayerManager, duration: Double) {
    // update available duration
    }
  • Player Status change

    func mediaPlayerStatusDidChange(sender: MediaPlayerManager, status: PlayerStatus) {
    // update player UI
    }
  • Player item change

    func mediaPlayerPlayURLDidChange(sender: MediaPlayerManager, playURL: URL?) {
    // Playeritem has changed
    }

Author

heilb1314

License

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

Latest podspec

{
    "name": "JWMediaManager",
    "version": "0.1.2",
    "summary": "A custom AVPlayer Manager",
    "description": "JWMediaManager give the functionalities for AVPlayer more easy to use.",
    "homepage": "https://github.com/heilb1314/JWMediaManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jianxiong Wang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/heilb1314/JWMediaManager.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "JWMediaManager/Classes/**/*",
    "frameworks": "AVFoundation",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This