Latest 0.1.5
Homepage https://github.com/josejuanqm/TVersaPlayer
License MIT
Platforms tvos 9.0
Authors

CI Status
Version
License
Platform

TVersaPlayer

Example

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

Example
TVersaPlayer

Installation

CocoaPods is a dependency manager for Cocoa projects.
You can install it with the following command:

$ gem install cocoapods

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

pod 'TVersaPlayer'

Usage

Basic Usage

VersaPlayer for tvOS comes with a VersaPlayerController so no need for autolayout on the player side.

TVersaPlayer aims to be simple to use but also flexible, to start using VersaPlayer first create a view programatically or via storyboard. Then add this few lines of code to start playing your video.

TVersaPlayer

Adding Controls

To add controls for your player use the VersaPlayerControls class, which comes packed with outlets to control your player, you can also add as many as you like by making a custom implementation.

VersaPlayerControls class include the following outlets:

Outlet Name Type Action
playPauseButton VersaStatefullButton Toggle playback
rewindButton VersaStatefullButton Rewind playback
forwardButton VersaStatefullButton Fast forward playback
skipForwardButton VersaStatefullButton Skip forward the time specified in second at skipSize (found in VersaPlayerControls)
skipBackwardButton VersaStatefullButton Skip backward the time specified in second at skipSize (found in VersaPlayerControls)
seekbarSlider VersaSeekbarSlider Seek through playback
currentTimeLabel VersaTimeLabel Indicate the current time
totalTimeLabel VersaTimeLabel Indicate the total time
bufferingView UIView Shown when player is buffering

TVersaPlayer

Extensions

Versa is aimed to be versatile, and that’s why it comes with an extensions feature, that lets you customize any aspect of the player by inheriting from VersaPlayerExtension.

This class comes with a player attribute that points to the player instance from which is being used.
To add an extension use the add(extension ext:) method found in https://josejuanqm.github.io/Libraries-Documentation/VersaPlayerCore/Classes/VersaPlayer.html.

Here are some extensions for VersaPlayer that may be useful for you.

  1. Overlay Content Extension

Documentation

Full documentation avilable https://josejuanqm.github.io/Libraries-Documentation/VersaPlayerCore/

Author

Jose Quintero – [email protected]

Donation

If you like this project or has been helpful to you, you can buy me a cup of coffe :)
Appreciate it!

paypal

License

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

Latest podspec

{
    "name": "TVersaPlayer",
    "version": "0.1.5",
    "summary": "AVPlayer and AVPlayerController implementation for tvOS",
    "description": "AVPlayer and AVPlayerController implementation for tvOS using VersaPlayer as base.",
    "homepage": "https://github.com/josejuanqm/TVersaPlayer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jose Quintero": "[email protected]"
    },
    "source": {
        "git": "https://github.com/josejuanqm/TVersaPlayer.git",
        "tag": "0.1.5"
    },
    "social_media_url": "https://twitter.com/josejuanqm",
    "platforms": {
        "tvos": "9.0"
    },
    "source_files": "TVersaPlayer/Classes/**/*",
    "swift_version": "4"
}

Pin It on Pinterest

Share This