Skip to content

dezouzart/clappr-ios

 
 

Repository files navigation

Build Status

Clappr for iOS

image

Installation

The easiest way is through CocoaPods. Simply add the dependency to your Podfile and then pod install:

pod 'Clappr', '~> 0.7.1'

Using the Player

Create
let options = [kSourceUrl : "http://clappr.io/highline.mp4"]
let player = Player(options: options)
Add it in your view
player.attachTo(yourView, controller: self)

Events

The player throw's a list of events that can be useful to your application.

Built-in Plugins

You can add options to the player. Here you can see the list of available options and how to use it.

External Playback in Background

To enable external playback while your app is in background, you should include the audio value to your app's Background Modes capabilities.

Manually editing Info.plist

Add the key UIBackgroundModes. Just after adding it to your Info.plist file, Xcode will translate to a more readable value Required background modes, which represents an array of values. Then, add a new item with value audio, which will be translated to App plays audio or streams audio/video using Airplay.

Capabilities Tab

Click on the target that represents your app. Open the Capabilities tab, and there, you'll see the list of available capabilities. One of them is the Background Modes. Change its toggle to on and mark the Audio, Airplay, and Picture in Picture checkbox.

License

You can find it here.

Sponsor

image

About

An extensible media player for iOS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 65.1%
  • Objective-C 31.2%
  • Ruby 3.6%
  • Makefile 0.1%