1 Commits

Author SHA1 Message Date
Mike Westendorf 30daad0694 Add deprecation warning to README 2017-09-09 11:52:22 -04:00
5 changed files with 8 additions and 53 deletions
@@ -210,19 +210,13 @@
TargetAttributes = {
AF87202C1CA44FBD004C752C = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 35R365FS4Q;
LastSwiftMigration = 0800;
};
AF8720401CA44FBD004C752C = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 35R365FS4Q;
LastSwiftMigration = 0800;
TestTargetID = AF87202C1CA44FBD004C752C;
};
AF87204B1CA44FBD004C752C = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 35R365FS4Q;
LastSwiftMigration = 0800;
TestTargetID = AF87202C1CA44FBD004C752C;
};
};
@@ -356,7 +350,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 35R365FS4Q;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -401,7 +394,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 35R365FS4Q;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -423,13 +415,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = "VimeoPlayer-iOS-Example/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "${SRCROOT}/VimeoPlayer-iOS-Example/Bridge.h";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
@@ -437,13 +427,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = "VimeoPlayer-iOS-Example/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "${SRCROOT}/VimeoPlayer-iOS-Example/Bridge.h";
SWIFT_VERSION = 2.3;
};
name = Release;
};
@@ -451,12 +439,10 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = "VimeoPlayer-iOS-ExampleTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VimeoPlayer-iOS-Example.app/VimeoPlayer-iOS-Example";
};
name = Debug;
@@ -465,12 +451,10 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = "VimeoPlayer-iOS-ExampleTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VimeoPlayer-iOS-Example.app/VimeoPlayer-iOS-Example";
};
name = Release;
@@ -482,7 +466,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = "VimeoPlayer-iOS-Example";
USES_XCTRUNNER = YES;
};
@@ -495,7 +478,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vimeo.VimeoPlayer-iOS-ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = "VimeoPlayer-iOS-Example";
USES_XCTRUNNER = YES;
};
@@ -520,7 +502,6 @@
AF8720571CA44FBD004C752C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
AF8720581CA44FBD004C752C /* Build configuration list for PBXNativeTarget "VimeoPlayer-iOS-ExampleTests" */ = {
isa = XCConfigurationList;
@@ -529,7 +510,6 @@
AF87205A1CA44FBD004C752C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
AF87205B1CA44FBD004C752C /* Build configuration list for PBXNativeTarget "VimeoPlayer-iOS-ExampleUITests" */ = {
isa = XCConfigurationList;
@@ -538,7 +518,6 @@
AF87205D1CA44FBD004C752C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
+4
View File
@@ -1,3 +1,7 @@
⚠️⚠️⚠️
This library has been deprecated and will be removed in the future. Use [PlayerKit](https://github.com/vimeo/PlayerKit) instead.
⚠️⚠️⚠️
# 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.
@@ -161,11 +161,9 @@
TargetAttributes = {
AF871FFD1CA447E5004C752C = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 35R365FS4Q;
};
AF8720071CA447E5004C752C = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 35R365FS4Q;
};
};
};
@@ -324,9 +322,7 @@
AF8720131CA447E5004C752C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 35R365FS4Q;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -344,7 +340,6 @@
isa = XCBuildConfiguration;
buildSettings = {
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 35R365FS4Q;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -361,7 +356,6 @@
AF8720161CA447E5004C752C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = VimeoPlayerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vimeo.VimeoPlayerTests;
@@ -372,7 +366,6 @@
AF8720171CA447E5004C752C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = 35R365FS4Q;
INFOPLIST_FILE = VimeoPlayerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vimeo.VimeoPlayerTests;
-2
View File
@@ -29,8 +29,6 @@
@class VIMVideoPlayer;
static const float TimeUpdateInterval = 0.1f;
@protocol VIMVideoPlayerDelegate <NSObject>
@optional
+4 -23
View File
@@ -28,6 +28,7 @@
static const float DefaultPlayableBufferLength = 2.0f;
static const float DefaultVolumeFadeDuration = 1.0f;
static const float TimeObserverInterval = 0.01f;
NSString * const kVideoPlayerErrorDomain = @"kVideoPlayerErrorDomain";
@@ -98,8 +99,6 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
self.muted = NO;
self.looping = NO;
self.player.usesExternalPlaybackWhileExternalScreenIsActive = YES;
[self setVolume:1.0f];
[self enableTimeUpdates];
[self enableAirplay];
@@ -165,8 +164,7 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
[self resetPlayerItemIfNecessary];
AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset: asset];
AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset:asset automaticallyLoadedAssetKeys:@[NSStringFromSelector(@selector(tracks))]];
if (!playerItem)
{
[self reportUnableToCreatePlayerItem];
@@ -644,7 +642,7 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
}
__weak typeof (self) weakSelf = self;
self.timeObserverToken = [self.player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(TimeUpdateInterval, NSEC_PER_SEC) queue:dispatch_get_main_queue() usingBlock:^(CMTime time) {
self.timeObserverToken = [self.player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(TimeObserverInterval, NSEC_PER_SEC) queue:dispatch_get_main_queue() usingBlock:^(CMTime time) {
__strong typeof (self) strongSelf = weakSelf;
if (!strongSelf)
@@ -721,29 +719,12 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
NSLog(@"Video player Status Failed: player item error = %@", self.player.currentItem.error);
NSLog(@"Video player Status Failed: player error = %@", self.player.error);
// First, try to use the player error if it exists
NSError *error = self.player.error;
// Otherwise try to use the current item's error
if (!error)
{
error = self.player.currentItem.error;
}
// If there's a more specific underlyng error, use that
NSError *underlyingError = [error.userInfo objectForKey:NSUnderlyingErrorKey];
if (underlyingError)
{
error = underlyingError;
}
// Finally, construct our own as a last resort
if (!error)
else
{
error = [NSError errorWithDomain:kVideoPlayerErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"unknown player error, status == AVPlayerItemStatusFailed"}];
}