9 Commits

Author SHA1 Message Date
Gavin King 3454df7198 formatting 2015-07-29 14:27:39 -04:00
Gavin King 5545e1bc43 Merge pull request #14 from efremidze/master
Added initializers (storyboard support)
2015-07-29 14:04:57 -04:00
Lasha Efremidze 367b516abd Update VIMVideoPlayerView.m
Added required initializers
2015-07-18 22:08:37 -07:00
Alfie Hanssen de0957a62b syntax error in podspec 2015-07-15 08:42:49 -04:00
Alfie Hanssen 9ce6b9092c updated podspec version 2015-07-15 08:40:28 -04:00
Alfie Hanssen 7e32ee3482 Update README.md 2015-06-08 09:14:35 -07:00
Alfie Hanssen 0d188c8228 Update README.md 2015-06-02 16:03:10 -04:00
Alfie Hanssen 840d01e1b0 pod version 2015-06-02 15:17:12 -04:00
Alfie Hanssen 5c39ae71a7 podspec pointed at tag 2015-06-02 15:13:58 -04:00
3 changed files with 39 additions and 92 deletions
+10 -1
View File
@@ -1,11 +1,20 @@
# VIMVideoPlayer
`VIMVideoPlayer` is a simple wrapper around the [`AVPlayer`](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html) and [`AVPlayerLayer`](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayerLayer_Class/index.html#//apple_ref/occ/cl/AVPlayerLayer) classes.
`VIMVideoPlayer` is a simple wrapper around the [`AVPlayer`](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html) and [`AVPlayerLayer`](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayerLayer_Class/index.html#//apple_ref/occ/cl/AVPlayerLayer) classes. Check out the [Pegasus](https://github.com/vimeo/Pegasus) project for a demo.
## Setup
Add the `VIMVideoPlayerView` and `VIMVideoPlayer` classes to your project.
Do this by including it as a git submodule or by using cocoapods:
```Ruby
# Add this to your podfile
target 'MyTarget' do
pod 'VIMVideoPlayer', '5.4.2'
end
```
## Usage
Create a new `VIMVideoPlayerView` and add it to your view hierarchy:
+4 -84
View File
@@ -8,56 +8,19 @@
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "VIMVideoPlayer"
s.version = "0.0.1"
s.version = "5.5"
s.summary = "A simple wrapper around the AVPlayer and AVPlayerLayer classes."
s.description = <<-DESC
VIMVideoPlayer is a simple wrapper around the AVPlayer and AVPlayerLayer classes. Check out the README for details. And the Pegasus project for a demo.
DESC
s.homepage = "https://github.com/vimeo/VIMVideoPlayer"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE.md" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "Alfie Hanssen" => "alfiehanssen@gmail.com" }
# Or just: s.author = "Alfie Hanssen"
# s.authors = { "Alfie Hanssen" => "alfiehanssen@gmail.com" }
# s.social_media_url = "http://twitter.com/vimeo
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
s.authors = { "Alfie Hanssen" => "alfiehanssen@gmail.com" }
s.social_media_url = "http://twitter.com/vimeo"
# s.platform = :ios
# s.platform = :ios, "7.0"
@@ -67,43 +30,10 @@ Pod::Spec.new do |s|
# s.osx.deployment_target = "10.7"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/vimeo/VIMVideoPlayer.git", :branch => "cocoapods" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source = { :git => "https://github.com/vimeo/VIMVideoPlayer.git", :tag => s.version.to_s }
s.source_files = "VIMVideoPlayer", "VIMVideoPlayer/*.{h,m}"
s.exclude_files = "VIMVideoPlayer/Exclude"
# s.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
@@ -116,16 +46,6 @@ Pod::Spec.new do |s|
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "AFNetworking", "~> 2.5.3"
end
+25 -7
View File
@@ -40,21 +40,39 @@
[self detachPlayer];
}
- (instancetype)init
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super init];
self = [super initWithFrame:frame];
if (self)
{
_player = [[VIMVideoPlayer alloc] init];
_player.muted = YES;
_player.looping = YES;
[self attachPlayer];
[self commonInit];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self)
{
[self commonInit];
}
return self;
}
- (void)commonInit
{
_player = [[VIMVideoPlayer alloc] init];
_player.muted = YES;
_player.looping = YES;
[self attachPlayer];
}
#pragma mark - Public API
- (void)setPlayer:(VIMVideoPlayer *)player