Skip to content

Commit

Permalink
Exposes properties
Browse files Browse the repository at this point in the history
  • Loading branch information
priore committed May 6, 2016
1 parent 5f65fcd commit cd7a4c0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion AVPlayerOverlay.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AVPlayerOverlay'
s.version = '1.2.3'
s.version = '1.2.4'
s.summary = 'AVPlayer with custom controls and full screen features.'
s.license = 'MIT'
s.ios.platform = '7.1'
Expand Down
17 changes: 9 additions & 8 deletions AVPlayerOverlay/AVPlayer/AVPlayerOverlayVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ - (void)hidePlayerBar
__weak typeof(self) wself = self;
[self setConstraintValue:height
forAttribute:NSLayoutAttributeBottom
duration:1.0 animations:^{
wself.volumeSlider.alpha = 0.0;
wself.playBigButton.alpha = 0.0;
} completion:^(BOOL finished) {
wself.volumeSlider.hidden = YES;
wself.playerBarView.hidden = YES;
wself.playBigButton.hidden = YES;
}];
duration:1.0
animations:^{
wself.volumeSlider.alpha = 0.0;
wself.playBigButton.alpha = 0.0;
} completion:^(BOOL finished) {
wself.volumeSlider.hidden = YES;
wself.playerBarView.hidden = YES;
wself.playBigButton.hidden = YES;
}];
}

- (void)showPlayerBar
Expand Down
4 changes: 4 additions & 0 deletions AVPlayerOverlay/AVPlayer/AVPlayerVC.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
#define AVPlayerVCSetVideoURLNotification @"avplayervcsetvideourl"

#import <AVKit/AVKit.h>
#import "AVPlayerOverlayVC.h"

IB_DESIGNABLE
@interface AVPlayerVC : AVPlayerViewController

@property (nonatomic, strong) NSURL *videoURL;
@property (nonatomic, strong) AVPlayerOverlayVC *overlayVC;

@property (nonatomic, assign) IBInspectable BOOL videoBackground;
@property (nonatomic, strong) IBInspectable NSString *overlayStoryboardId;

- (void)playInBackground:(BOOL)play;

@end
12 changes: 5 additions & 7 deletions AVPlayerOverlay/AVPlayer/AVPlayerVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
#import <CoreMedia/CoreMedia.h>
#import <AVFoundation/AVFoundation.h>
#import "AVPlayerVC.h"
#import "AVPlayerOverlayVC.h"

@interface AVPlayerVC()

@property (nonatomic, strong) AVPlayerOverlayVC *overlayVC;

@end

@implementation AVPlayerVC

Expand Down Expand Up @@ -139,6 +132,11 @@ - (void)remoteControlReceivedWithEvent:(UIEvent *)event
}
}

- (void)dealloc
{
_overlayVC = nil;
}

#pragma mark - Video (only audio) on background

- (void)playInBackground:(BOOL)play
Expand Down

0 comments on commit cd7a4c0

Please sign in to comment.