Skip to content

Commit

Permalink
AirPlay
Browse files Browse the repository at this point in the history
  • Loading branch information
priore committed Mar 21, 2017
1 parent ca3312b commit bee627d
Show file tree
Hide file tree
Showing 11 changed files with 334 additions and 27 deletions.
2 changes: 1 addition & 1 deletion AVPlayerOverlay.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AVPlayerOverlay'
s.version = '1.6'
s.version = '1.7'
s.summary = 'AVPlayer with custom controls and full screen features.'
s.license = 'MIT'
s.authors = { 'Danilo Priore' => 'support@prioregroup.com' }
Expand Down
3 changes: 3 additions & 0 deletions AVPlayerOverlay.xcodeproj/project.pbxproj
Expand Up @@ -147,6 +147,7 @@
TargetAttributes = {
9F16AFEA1CD3E3980082CC15 = {
CreatedOnToolsVersion = 7.3;
DevelopmentTeam = JQRB98RUML;
};
};
};
Expand Down Expand Up @@ -311,6 +312,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JQRB98RUML;
INFOPLIST_FILE = AVPlayerOverlay/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.prioregroup.AVPlayerOverlay;
Expand All @@ -322,6 +324,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = JQRB98RUML;
INFOPLIST_FILE = AVPlayerOverlay/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.prioregroup.AVPlayerOverlay;
Expand Down
25 changes: 23 additions & 2 deletions AVPlayerOverlay/AVPlayer/AVPlayerOverlayVC.h
Expand Up @@ -4,8 +4,13 @@
// Created by Danilo Priore on 28/04/16.
// Copyright © 2016 Prioregroup.com. All rights reserved.
//
#define AVPlayerOverlayVCFullScreenNotification @"AVPlayerOverlayVCFullScreen"
#define AVPlayerOverlayVCNormalScreenNotification @"AVPlayerOverlayVCNormalScreen"
#define AVPlayerOverlayVCFullScreenNotification @"AVPlayerOverlayVCFullScreen"
#define AVPlayerOverlayVCNormalScreenNotification @"AVPlayerOverlayVCNormalScreen"
#define AVPlayerOverlayVCAirPlayInUseNotification @"AVPlayerOverlayVCAirPlayInUse"
#define AVPlayerOverlayVCAirPlayBecomePresentNotification @"AVPlayerOverlayVCAirPlayBecomePresent"
#define AVPlayerOverlayVCAirPlayResignPresentNotification @"AVPlayerOverlayVCAirPlayResignPresent"

#define kAVPlayerOverlayVCAirPlayInUse @"airPlayInUse"

@import UIKit;

Expand All @@ -25,17 +30,24 @@ IB_DESIGNABLE
@property (nonatomic, weak) IBOutlet UIButton *playBigButton;
@property (nonatomic, weak) IBOutlet UIButton *volumeButton;
@property (nonatomic, weak) IBOutlet UIButton *fullscreenButton;
@property (nonatomic, weak) IBOutlet UIButton *airPlayButton;
@property (nonatomic, weak) IBOutlet UIButton *subtitlesButton;
@property (nonatomic, weak) IBOutlet UISlider *videoSlider;
@property (nonatomic, weak) IBOutlet UISlider *volumeSlider;
@property (nonatomic, weak) IBOutlet UILabel *subtitlesLabel;
@property (nonatomic, weak) IBOutlet UILabel *currentTimeLabel;
@property (nonatomic, weak) IBOutlet UILabel *durationTimeLabel;

@property (nonatomic, weak) AVPlayer *player;

@property (nonatomic, assign) IBInspectable NSTimeInterval playBarAutoideInterval;
@property (nonatomic, assign) IBInspectable AVPlayerFullscreenAutorotaionMode autorotationMode;

@property (nonatomic, assign, readonly) BOOL isFullscreen;
@property (nonatomic, assign, readonly) BOOL isAirplayInUse;
@property (nonatomic, assign, readonly) BOOL isAirplayPresent;

@property (nonatomic, strong, readonly) NSString *airPlayPlayerName;

- (void)updateProgressBar;

Expand Down Expand Up @@ -68,6 +80,15 @@ IB_DESIGNABLE

- (NSAttributedString*)attributedSubtitle:(id)subtitle;

- (void)setupAirPlay;
- (void)deallocAirplay;
- (void)airPlayRouteChange:(NSNotification*)note;
- (BOOL)checkAirPlayIsRunning;
- (void)airPlayChangeInUseState:(BOOL)isInUse;

- (void)airplayBecomePresent;
- (void)airplayResignPresent;

- (void)forceDeviceOrientation:(UIInterfaceOrientation)orientation;
- (void)deviceOrientationDidChange:(NSNotification *)notification;

Expand Down

0 comments on commit bee627d

Please sign in to comment.