PlayerView
An elegant wraper API for AVPlayer to get events over Delegate so you dount need to use KVO
Installation
PlayerView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
CocoaPods
PlayerView
is available through CocoaPods. To install
it, simply add the following line to your Podfile
:
Carthage
Installation is also available using the dependency manager Carthage.
To integrate, add the following line to your Cartfile
:
Swift Package Manager
Installation can be done with the Swift Package Manager, add the following in your Package.swift
:
Usage
To run the example project, clone the repo, and run pod install
from the Example directory first.
Storyboard
Just add a view and add as a class on Identity inspector > Custom Class > Class, make sure to add Module if is imported externaly (Pod, Package manager ....)
Code
Just need to add de view as a normal View:
Control
Delegate
you could get event data from the PlayerView, just implement the delegate
all the functions are optionals
Extra Info
-
If you like another shorcut, have a better implementation of something or just say thanks, just send me an email [davidlondono9@gmail.com](mailto:davidlondono9@gmail.com?subject=PlayerView is Awesome)
-
Im using a video on http, so I needed to add this on the
info.plist
to accept all on http,
this is not safe to use on production, so better to add only trusted domains or use https
Author
David Alejandro, [davidlondono9@gmail.com](mailto:davidlondono9@gmail.com?subject=PlayerView is Awesome)
License
PlayerView is available under the MIT license. See the LICENSE file for more info.