26 Commits

Author SHA1 Message Date
Rob Huebner 66d629f0e1 update podspec 2016-03-08 14:23:06 -05:00
Gavin King c25d1cd49e Merge pull request #37 from vimeo/playerReset
Refactoring
2016-02-25 11:35:14 -05:00
Gavin King a979a07652 changes 2016-02-25 10:15:01 -05:00
Gavin King eb6dbdf5a5 fixing the file swap bug 2016-02-24 21:36:08 -05:00
Kevin Zetterstrom 3ecf8458cf Merge pull request #36 from vimeo/github_templates
adding github PR and issue templates
2016-02-19 11:05:59 -05:00
Kevin Zetterstrom 7a74c1e67d add required for Vimeans only 2016-02-19 11:04:15 -05:00
Kevin Zetterstrom e9a64fb531 adding github PR and issue templates 2016-02-19 09:40:58 -05:00
Alfie Hanssen eaf4f4b492 Merge pull request #35 from vimeo/readme-updates
Added information on Vimeo video playback to the README
2016-02-15 16:57:19 -05:00
Alfie Hanssen d42db154ca tweaks 2016-02-13 14:56:02 -05:00
Alfie Hanssen f09240d4d0 tweaks 2016-02-13 14:54:44 -05:00
Alfie Hanssen 91f68ff891 tweaks 2016-02-13 14:51:35 -05:00
Alfie Hanssen 25ee3e009a added information on vimeo video playback to the readme 2016-02-13 14:49:05 -05:00
Alfie Hanssen cc979b602c Update README.md 2016-02-04 15:08:00 -05:00
Rob Huebner a9fee87379 Merge pull request #32 from jersonperpetua/minimum_deployment_target_iOS_8.0
Reduce the minimum deployment target to iOS 8.0
2016-02-03 11:32:32 -05:00
Rob Huebner 15d08fe2b4 Merge pull request #33 from vimeo/playback-likely-to-keep-up
Adding appropriate playback likely to keep up callbacks
2016-01-29 10:54:03 -05:00
Rob Huebner 37e471cf04 adding comment 2016-01-29 10:53:20 -05:00
Rob Huebner e296e11ba6 adding appropriate playback likely to keep up callbacks 2016-01-28 17:50:38 -05:00
Jerson Michael Perpetua cbab5b4c7b Reduce the minimum deployment target to iOS 8.0 2016-01-27 16:06:36 +08:00
Rob Huebner c00367896d Merge pull request #30 from dtweston/carthage_support
Add a framework target for Carthage support
2016-01-06 13:54:36 -05:00
Dave Weston 0e68ced41a Add a framework target for Carthage support 2015-12-19 22:04:04 -05:00
Rob Huebner 8162c1cb3b Merge pull request #25 from vimeo/player-6.0
delegate callback for playback buffer empty
2015-11-25 12:58:23 -05:00
Alfie Hanssen ce399a8e98 Merge pull request #23 from edenvicary/patch-1
Fix broken contact link
2015-11-17 08:45:32 -05:00
Rob Huebner 932d66e6ba delegate callback for playback buffer empty 2015-11-16 15:24:18 -05:00
Eden Vicary de01806e8a Fix broken contact link 2015-11-16 18:31:06 +10:00
Alfie Hanssen d799cbb15b Merge pull request #20 from vimeo/pods
Deleted some comments from podspec
2015-10-08 13:30:43 -04:00
Alfie Hanssen 35e0d78004 deleted some comments from podspec 2015-10-06 13:58:30 -04:00
14 changed files with 364 additions and 36 deletions
+11
View File
@@ -0,0 +1,11 @@
#### Issue Summary
A brief but thorough description of the issue.
#### Reproduction Steps
Detailed steps to reproduce the issue.
#### Expected Behavior
What do you expect to happen as a result of the reproduction steps?
#### Actual Behavior
What currently happens as a result of the reproduction steps?
+12
View File
@@ -0,0 +1,12 @@
#### Ticket
**Required for Vimeans only**
[TICKET_NUMBER](https://vimean.atlassian.net/browse/TICKET_NUMBER)
#### Ticket Summary
A brief but thorough description of the ticket.
#### Implementation Summary
A brief but thorough description of the changes put in place to address the ticket.
#### How to Test
Detailed *list* of what to test and how to test it. Including all edge cases.
+23 -7
View File
@@ -1,17 +1,17 @@
# 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. Check out the [Pegasus](https://github.com/vimeo/Pegasus) project for a demo.
`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.
## Setup
Add the `VIMVideoPlayerView` and `VIMVideoPlayer` classes to your project.
Do this by including it as a git submodule or by using cocoapods:
Do this by including this repo as a git submodule or by using cocoapods:
```Ruby
# Add this to your podfile
target 'MyTarget' do
pod 'VIMVideoPlayer', '5.4.2'
pod 'VIMVideoPlayer', {version_number}
end
```
@@ -50,10 +50,16 @@ Play a video:
```Objective-c
// Using an NSURL
NSURL *URL = ...;
NSURL *URL = ...;
[self.videoPlayerView.player setURL:URL];
[self.videoPlayerView.player play];
/*
Note: This must be a URL to an actual video resource (e.g. http://website.com/video.mp4 or .m3u8 etc.),
It cannot be a URL to a web page (e.g. https://vimeo.com/67069182),
See below for info on using VIMVideoPlayer to play Vimeo videos.
*/
// Using an AVPlayerItem
AVPlayerItem *playerItem = ...;
@@ -83,9 +89,19 @@ Optionally implement the `VIMVideoPlayerViewDelegate` protocol methods:
@end
```
See `VIMVideoPlayer.h` for additional configuration options and functionality.
See [`VIMVideoPlayer.h`](https://github.com/vimeo/VIMVideoPlayer/blob/master/VIMVideoPlayer/VIMVideoPlayer.h) for additional configuration options.
See the [Pegasus](https://github.com/vimeo/Pegasus) project for an example of how to encapsulate a `VIMVideoPlayerView` instance with playback controls (play/pause/seek/airplay etc).
## Playing Vimeo Videos
[Vimeo Pro](https://vimeo.com/pro) members can access playback URLs for Vimeo videos using the [Vimeo API](https://developer.vimeo.com/). Playback URLs are only included in the response object if the requesting account is a [Vimeo Pro](https://vimeo.com/pro) account.
If you have a [Vimeo Pro](https://vimeo.com/pro) account, when you make a request to the [Vimeo API](https://developer.vimeo.com/) for a video object the response object will contain a list of video `files`. These represent the various resolution video files available for this particular video. Each has a `link`. You can use the string value keyed to `link` to create an NSURL. You can pass this NSURL to VIMVideoPlayer for playback.
Check out [this](http://stackoverflow.com/questions/31960338/ios-vimvideoplayerview-cant-load-vimeo-videos) Stack Overflow question for additional info.
You can use the [Vimeo iOS SDK](https://github.com/vimeo/VIMNetworking) to interact with the [Vimeo API](https://developer.vimeo.com/).
For full documentation on the Vimeo API go [here](https://developer.vimeo.com/).
## License
@@ -97,4 +113,4 @@ Tweet at us here: @vimeoapi
Post on [Stackoverflow](http://stackoverflow.com/questions/tagged/vimeo-ios) with the tag `vimeo-ios`
Get in touch [here](Vimeo.com/help/contact)
Get in touch [here](https://vimeo.com/help/contact)
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+11
View File
@@ -0,0 +1,11 @@
#import <UIKit/UIKit.h>
//! Project version number for VIMVideoKit.
FOUNDATION_EXPORT double VIMVideoKitVersionNumber;
//! Project version string for VIMVideoKit.
FOUNDATION_EXPORT const unsigned char VIMVideoKitVersionString[];
#import <VIMVideoKit/VIMVideoPlayer.h>
#import <VIMVideoKit/VIMVideoPlayerView.h>
+2 -20
View File
@@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = "VIMVideoPlayer"
s.version = "5.6.0"
s.version = "6.0.0"
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.
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE.md" }
s.authors = { "Alfie Hanssen" => "alfiehanssen@gmail.com",
s.authors = { "Alfie Hanssen" => "alfiehanssen@gmail.com",
"Rob Huebner" => "robh@vimeo.com",
"Gavin King" => "gavin@vimeo.com",
"Kashif Muhammad" => "support@vimeo.com",
@@ -29,30 +29,12 @@ s.authors = { "Alfie Hanssen" => "alfiehanssen@gmail.com",
s.social_media_url = "http://twitter.com/vimeo"
# s.platform = :ios
# s.platform = :ios, "7.0"
# When using multiple platforms
s.ios.deployment_target = "7.0"
# s.osx.deployment_target = "10.7"
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"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
s.requires_arc = true
end
+134 -1
View File
@@ -8,9 +8,14 @@
/* Begin PBXBuildFile section */
501A3B931BA205A20059040B /* VIMVideoPlayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 501A3B921BA205A20059040B /* VIMVideoPlayerTests.m */; };
501A3B951BA205A20059040B /* libVIMVideoPlayer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E507001B1E23A600DF1F7A /* libVIMVideoPlayer.a */; settings = {ASSET_TAGS = (); }; };
501A3B951BA205A20059040B /* libVIMVideoPlayer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E507001B1E23A600DF1F7A /* libVIMVideoPlayer.a */; };
50E5071E1B1E23E100DF1F7A /* VIMVideoPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 50E5071B1B1E23E100DF1F7A /* VIMVideoPlayer.m */; };
50E5071F1B1E23E100DF1F7A /* VIMVideoPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 50E5071D1B1E23E100DF1F7A /* VIMVideoPlayerView.m */; };
B698D9241C264D5C0011F8B4 /* VIMVideoKit.h in Headers */ = {isa = PBXBuildFile; fileRef = B698D9231C264D5C0011F8B4 /* VIMVideoKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
B698D9291C264D670011F8B4 /* VIMVideoPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 50E5071B1B1E23E100DF1F7A /* VIMVideoPlayer.m */; };
B698D92A1C264D670011F8B4 /* VIMVideoPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 50E5071D1B1E23E100DF1F7A /* VIMVideoPlayerView.m */; };
B698D92B1C264DD10011F8B4 /* VIMVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E5071A1B1E23E100DF1F7A /* VIMVideoPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
B698D92C1C264DD10011F8B4 /* VIMVideoPlayerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E5071C1B1E23E100DF1F7A /* VIMVideoPlayerView.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -44,6 +49,9 @@
50E5071B1B1E23E100DF1F7A /* VIMVideoPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VIMVideoPlayer.m; sourceTree = "<group>"; };
50E5071C1B1E23E100DF1F7A /* VIMVideoPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VIMVideoPlayerView.h; sourceTree = "<group>"; };
50E5071D1B1E23E100DF1F7A /* VIMVideoPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VIMVideoPlayerView.m; sourceTree = "<group>"; };
B698D9211C264D5B0011F8B4 /* VIMVideoKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VIMVideoKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B698D9231C264D5C0011F8B4 /* VIMVideoKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VIMVideoKit.h; sourceTree = "<group>"; };
B698D9251C264D5C0011F8B4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -62,6 +70,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B698D91D1C264D5B0011F8B4 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -79,6 +94,7 @@
children = (
50E507021B1E23A600DF1F7A /* VIMVideoPlayer */,
501A3B911BA205A20059040B /* VIMVideoPlayerTests */,
B698D9221C264D5C0011F8B4 /* VIMVideoKit */,
50E507011B1E23A600DF1F7A /* Products */,
);
sourceTree = "<group>";
@@ -88,6 +104,7 @@
children = (
50E507001B1E23A600DF1F7A /* libVIMVideoPlayer.a */,
501A3B901BA205A20059040B /* VIMVideoPlayerTests.xctest */,
B698D9211C264D5B0011F8B4 /* VIMVideoKit.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -103,8 +120,30 @@
path = VIMVideoPlayer;
sourceTree = "<group>";
};
B698D9221C264D5C0011F8B4 /* VIMVideoKit */ = {
isa = PBXGroup;
children = (
B698D9231C264D5C0011F8B4 /* VIMVideoKit.h */,
B698D9251C264D5C0011F8B4 /* Info.plist */,
);
path = VIMVideoKit;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
B698D91E1C264D5B0011F8B4 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
B698D92B1C264DD10011F8B4 /* VIMVideoPlayer.h in Headers */,
B698D92C1C264DD10011F8B4 /* VIMVideoPlayerView.h in Headers */,
B698D9241C264D5C0011F8B4 /* VIMVideoKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
501A3B8F1BA205A20059040B /* VIMVideoPlayerTests */ = {
isa = PBXNativeTarget;
@@ -141,6 +180,24 @@
productReference = 50E507001B1E23A600DF1F7A /* libVIMVideoPlayer.a */;
productType = "com.apple.product-type.library.static";
};
B698D9201C264D5B0011F8B4 /* VIMVideoKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = B698D9281C264D5C0011F8B4 /* Build configuration list for PBXNativeTarget "VIMVideoKit" */;
buildPhases = (
B698D91C1C264D5B0011F8B4 /* Sources */,
B698D91D1C264D5B0011F8B4 /* Frameworks */,
B698D91E1C264D5B0011F8B4 /* Headers */,
B698D91F1C264D5B0011F8B4 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = VIMVideoKit;
productName = VIMVideoPlayerFramework;
productReference = B698D9211C264D5B0011F8B4 /* VIMVideoKit.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -156,6 +213,9 @@
50E506FF1B1E23A600DF1F7A = {
CreatedOnToolsVersion = 6.3.1;
};
B698D9201C264D5B0011F8B4 = {
CreatedOnToolsVersion = 7.2;
};
};
};
buildConfigurationList = 50E506FB1B1E23A600DF1F7A /* Build configuration list for PBXProject "VIMVideoPlayer" */;
@@ -172,6 +232,7 @@
targets = (
50E506FF1B1E23A600DF1F7A /* VIMVideoPlayer */,
501A3B8F1BA205A20059040B /* VIMVideoPlayerTests */,
B698D9201C264D5B0011F8B4 /* VIMVideoKit */,
);
};
/* End PBXProject section */
@@ -184,6 +245,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B698D91F1C264D5B0011F8B4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -204,6 +272,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B698D91C1C264D5B0011F8B4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B698D9291C264D670011F8B4 /* VIMVideoPlayer.m in Sources */,
B698D92A1C264D670011F8B4 /* VIMVideoPlayerView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@@ -335,6 +412,52 @@
};
name = Release;
};
B698D9261C264D5C0011F8B4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = VIMVideoKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vimeo.VIMVideoKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
B698D9271C264D5C0011F8B4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = VIMVideoKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vimeo.VIMVideoKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -345,6 +468,7 @@
501A3B9A1BA205A20059040B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
50E506FB1B1E23A600DF1F7A /* Build configuration list for PBXProject "VIMVideoPlayer" */ = {
isa = XCConfigurationList;
@@ -364,6 +488,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B698D9281C264D5C0011F8B4 /* Build configuration list for PBXNativeTarget "VIMVideoKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B698D9261C264D5C0011F8B4 /* Debug */,
B698D9271C264D5C0011F8B4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 50E506F81B1E23A600DF1F7A /* Project object */;
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B698D9201C264D5B0011F8B4"
BuildableName = "VIMVideoKit.framework"
BlueprintName = "VIMVideoKit"
ReferencedContainer = "container:VIMVideoPlayer.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B698D9201C264D5B0011F8B4"
BuildableName = "VIMVideoKit.framework"
BlueprintName = "VIMVideoKit"
ReferencedContainer = "container:VIMVideoPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B698D9201C264D5B0011F8B4"
BuildableName = "VIMVideoKit.framework"
BlueprintName = "VIMVideoKit"
ReferencedContainer = "container:VIMVideoPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -20,6 +20,20 @@
ReferencedContainer = "container:VIMVideoPlayer.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B698D9201C264D5B0011F8B4"
BuildableName = "VIMVideoKit.framework"
BlueprintName = "VIMVideoKit"
ReferencedContainer = "container:VIMVideoPlayer.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
+2
View File
@@ -37,6 +37,8 @@
- (void)videoPlayerDidReachEnd:(VIMVideoPlayer *)videoPlayer;
- (void)videoPlayer:(VIMVideoPlayer *)videoPlayer timeDidChange:(CMTime)cmTime;
- (void)videoPlayer:(VIMVideoPlayer *)videoPlayer loadedTimeRangeDidChange:(float)duration;
- (void)videoPlayerPlaybackBufferEmpty:(VIMVideoPlayer *)videoPlayer;
- (void)videoPlayerPlaybackLikelyToKeepUp:(VIMVideoPlayer *)videoPlayer;
- (void)videoPlayer:(VIMVideoPlayer *)videoPlayer didFailWithError:(NSError *)error;
@end
+26 -3
View File
@@ -95,8 +95,13 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
- (void)setupPlayer
{
self.player = [[AVPlayer alloc] init];
self.player.muted = NO;
self.player.allowsExternalPlayback = YES;
self.muted = NO;
self.looping = NO;
[self setVolume:1.0f];
[self enableTimeUpdates];
[self enableAirplay];
}
- (void)setupAudioSession
@@ -734,6 +739,18 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
}
}
}
else if (newStatus == AVPlayerItemStatusReadyToPlay)
{
// When playback resumes after a buffering event, a new ReadyToPlay status is set [RH]
if ([self.delegate respondsToSelector:@selector(videoPlayerPlaybackLikelyToKeepUp:)])
{
dispatch_async(dispatch_get_main_queue(), ^
{
[self.delegate videoPlayerPlaybackLikelyToKeepUp:self];
});
}
}
}
else if (context == VideoPlayer_PlayerItemPlaybackBufferEmpty)
{
@@ -741,7 +758,13 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
{
if (self.isPlaying)
{
// TODO: Show Loading indicator
dispatch_async(dispatch_get_main_queue(), ^
{
if ([self.delegate respondsToSelector:@selector(videoPlayerPlaybackBufferEmpty:)])
{
[self.delegate videoPlayerPlaybackBufferEmpty:self];
}
});
}
}
}
+4
View File
@@ -37,6 +37,8 @@
- (void)videoPlayerViewDidReachEnd:(VIMVideoPlayerView *)videoPlayerView;
- (void)videoPlayerView:(VIMVideoPlayerView *)videoPlayerView timeDidChange:(CMTime)cmTime;
- (void)videoPlayerView:(VIMVideoPlayerView *)videoPlayerView loadedTimeRangeDidChange:(float)duration;
- (void)videoPlayerViewPlaybackBufferEmpty:(VIMVideoPlayerView *)videoPlayerView;
- (void)videoPlayerViewPlaybackLikelyToKeepUp:(VIMVideoPlayerView *)videoPlayerView;
- (void)videoPlayerView:(VIMVideoPlayerView *)videoPlayerView didFailWithError:(NSError *)error;
@end
@@ -47,6 +49,8 @@
@property (nonatomic, strong) VIMVideoPlayer *player;
- (void)setPlayer:(VIMVideoPlayer *)player;
- (void)setVideoFillMode:(NSString *)fillMode;
@end
+19 -5
View File
@@ -66,11 +66,9 @@
- (void)commonInit
{
_player = [[VIMVideoPlayer alloc] init];
_player.muted = YES;
_player.looping = YES;
VIMVideoPlayer *player = [[VIMVideoPlayer alloc] init];
[self attachPlayer];
[self setPlayer:player];
}
#pragma mark - Public API
@@ -81,7 +79,7 @@
{
return;
}
[self detachPlayer];
_player = player;
@@ -156,6 +154,22 @@
}
}
- (void)videoPlayerPlaybackBufferEmpty:(VIMVideoPlayer *)videoPlayer
{
if ([self.delegate respondsToSelector:@selector(videoPlayerViewPlaybackBufferEmpty:)])
{
[self.delegate videoPlayerViewPlaybackBufferEmpty:self];
}
}
- (void)videoPlayerPlaybackLikelyToKeepUp:(VIMVideoPlayer *)videoPlayer
{
if ([self.delegate respondsToSelector:@selector(videoPlayerViewPlaybackLikelyToKeepUp:)])
{
[self.delegate videoPlayerViewPlaybackLikelyToKeepUp:self];
}
}
- (void)videoPlayer:(VIMVideoPlayer *)videoPlayer didFailWithError:(NSError *)error
{
if ([self.delegate respondsToSelector:@selector(videoPlayerView:didFailWithError:)])