Giter Club home page Giter Club logo

player's Introduction

Player

Player

Player is a simple iOS video player library written in Swift.

Features

  • plays local media or streams remote media over HTTP
  • customizable UI and user interaction
  • no size restrictions
  • orientation change support
  • simple API

If you're looking for a video player library written in Objective-C, checkout PBJVideoPlayer. For video recording, checkout PBJVision.

Pod Version

Installation

CocoaPods

Player is available and recommended for installation using the Cocoa dependency manager CocoaPods. Swift is supported as of version 0.36.

To integrate, add the following to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :iOS, '8.0'
use_frameworks!

pod 'Player'

Carthage

Installation is also available using the dependency manager Carthage.

To integrate, add the following line to your Cartfile:

github "piemonte/Player" >= 0.0.5

Manual

You can also simply copy the Player.swift file into your Xcode project.

Usage

The sample project provides an example of how to integrate Player, otherwise you can follow these steps.

Allocate and add the Player controller to your view hierarchy.

 self.player = Player()
 self.player.delegate = self
 self.player.view.frame = self.view.bounds
    
 self.addChildViewController(self.player)
 self.view.addSubview(self.player.view)
 self.player.didMoveToParentViewController(self)

Provide the file path to the resource you would like to play locally or stream. Ensure you're including the file extension.

let videoUrl: NSURL = // file or http url
self.player.setUrl(videoUrl)

play/pause/chill

 self.player.playFromBeginning()

Adjust the fill mode for the video, if needed.

 self.player.fillMode = “AVLayerVideoGravityResizeAspect”

Community

Resources

License

Player is available under the MIT license, see the LICENSE file for more information.

player's People

Contributors

aalzanki avatar angelcasado avatar lumenlunae avatar pgherveou avatar piemonte avatar rromanchuk avatar xhacker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.