7 Commits

Author SHA1 Message Date
Alfie Hanssen dd8b5b9dc6 updated podspec 2015-08-14 17:33:42 -04:00
Alfie Hanssen 5775bbc2af Merge pull request #15 from vimeo/vim-2661
Fix for crash where av player status == failed but there's no nserror
2015-08-13 11:56:38 -04:00
Alfie Hanssen 0a9707d68f fix for crash where av player status == failed but theres no nserror 2015-08-10 14:22:49 -04:00
Rob Huebner c1c2f93793 updated podspec 2015-07-31 17:27:47 -04:00
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
3 changed files with 43 additions and 10 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = "VIMVideoPlayer"
s.version = "5.5"
s.version = "5.5.3"
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.
+17 -2
View File
@@ -702,14 +702,29 @@ static void *VideoPlayer_PlayerItemLoadedTimeRangesContext = &VideoPlayer_Player
}
case AVPlayerItemStatusFailed:
{
NSLog(@"Video player Status Failed: error = %@", self.player.currentItem.error);
NSLog(@"Video player Status Failed: player item error = %@", self.player.currentItem.error);
NSLog(@"Video player Status Failed: player error = %@", self.player.error);
if ([self.delegate respondsToSelector:@selector(videoPlayer:didFailWithError:)])
{
[self reset];
dispatch_async(dispatch_get_main_queue(), ^{
[self.delegate videoPlayer:self didFailWithError:self.player.currentItem.error];
if (self.player.error)
{
[self.delegate videoPlayer:self didFailWithError:self.player.error];
}
else if (self.player.currentItem.error)
{
[self.delegate videoPlayer:self didFailWithError:self.player.currentItem.error];
}
else
{
NSError *error = [NSError errorWithDomain:kVideoPlayerErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"unknown player error, status == AVPlayerItemStatusFailed"}];
[self.delegate videoPlayer:self didFailWithError:error];
}
});
}
+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