├── .gitignore ├── Classes ├── 3rd-Parties │ ├── UIView+MHNibLoading.h │ └── UIView+MHNibLoading.m ├── Core │ ├── HKLog.h │ ├── HKLog.m │ ├── HKUtility.h │ ├── HKUtility.m │ ├── HKVideoPlayerCoreView.h │ ├── HKVideoPlayerCoreView.m │ ├── HKVideoPlayerCoreViewDelegate.h │ ├── HKVideoPlayerEvent.h │ ├── HKVideoPlayerException.h │ ├── HKVideoPlayerException.m │ ├── HKVideoPlayerFuntionality.h │ ├── HKVideoPlayerNotifications.h │ ├── HKVideoPlayerThemeView.h │ ├── HKVideoPlayerThemeView.m │ ├── HKVideoPlayerThemeViewDelegate.h │ ├── UIViewController+Draggable.h │ └── UIViewController+Draggable.m ├── HKVideoPlayerViewController.h ├── HKVideoPlayerViewController.m ├── HKVideoPlayerViewControllerDelegate.h └── Themes │ ├── HKVideoPlayer.bundle │ ├── Assets │ │ ├── Image_Button_airplay.png │ │ ├── Image_Button_airplay@2x.png │ │ ├── Image_Button_close.png │ │ ├── Image_Button_close@2x.png │ │ ├── Image_Button_cross.png │ │ ├── Image_Button_cross@2x.png │ │ ├── Image_Button_fullscreen.png │ │ ├── Image_Button_fullscreen@2x.png │ │ ├── Image_Button_minimize.png │ │ ├── Image_Button_minimize@2x.png │ │ ├── Image_Button_next.png │ │ ├── Image_Button_next@2x.png │ │ ├── Image_Button_pause.png │ │ ├── Image_Button_pause2.png │ │ ├── Image_Button_pause2@2x.png │ │ ├── Image_Button_pause@2x.png │ │ ├── Image_Button_pause_big.png │ │ ├── Image_Button_pause_big@2x.png │ │ ├── Image_Button_play.png │ │ ├── Image_Button_play2.png │ │ ├── Image_Button_play2@2x.png │ │ ├── Image_Button_play@2x.png │ │ ├── Image_Button_play_big.png │ │ ├── Image_Button_play_big@2x.png │ │ ├── Image_Button_rewind.png │ │ ├── Image_Button_rewind@2x.png │ │ ├── Image_Button_share.png │ │ ├── Image_Button_share@2x.png │ │ ├── Image_Button_transparentBar.png │ │ ├── Image_Button_transparentBar@2x.png │ │ ├── Image_Button_zoom_in.png │ │ ├── Image_Button_zoom_in@2x.png │ │ ├── Image_Button_zoom_out.png │ │ └── Image_Button_zoom_out@2x.png │ ├── Others │ │ ├── airplay-display.png │ │ ├── airplay-display@2x.png │ │ ├── fullscreen-button.png │ │ ├── fullscreen-button@2x.png │ │ ├── minimize-button.png │ │ ├── minimize-button@2x.png │ │ ├── pause-button.png │ │ ├── pause-button@2x.png │ │ ├── play-button.png │ │ ├── play-button@2x.png │ │ ├── share-button.png │ │ ├── share-button@2x.png │ │ ├── transparentBar.png │ │ └── transparentBar@2x.png │ ├── Root.plist │ ├── Themes │ │ └── Green │ │ │ ├── add_sections_icon_collect.png │ │ │ ├── add_sections_icon_collect@2x.png │ │ │ ├── add_sections_icon_open.png │ │ │ ├── add_sections_icon_open@2x.png │ │ │ ├── address_bar_ic_refresh_pressed@2x.png │ │ │ ├── address_bar_ic_refresh_pressed_top_tab_mode@2x.png │ │ │ ├── address_bar_ic_refresh_top_tab_mode@2x.png │ │ │ ├── address_bar_ic_stop_pressed@2x.png │ │ │ ├── address_bar_ic_stop_pressed_top_tab_mode@2x.png │ │ │ ├── address_bar_ic_stop_top_tab_mode@2x.png │ │ │ ├── bookmark_icon@2x.png │ │ │ ├── bookmark_sync_icon@2x.png │ │ │ ├── bookmark_sync_icon_pressed@2x.png │ │ │ ├── bottom_bar_back_disable@2x.png │ │ │ ├── bottom_bar_back_normal@2x.png │ │ │ ├── bottom_bar_back_pressed@2x.png │ │ │ ├── bottom_bar_forward_disable@2x.png │ │ │ ├── bottom_bar_forward_normal@2x.png │ │ │ ├── bottom_bar_forward_pressed@2x.png │ │ │ ├── bottom_bar_menu_normal@2x.png │ │ │ ├── bottom_bar_menu_pressed@2x.png │ │ │ ├── bottom_bar_stop_normal@2x.png │ │ │ ├── bottom_bar_stop_pressed@2x.png │ │ │ ├── bottom_bar_tab_normal@2x.png │ │ │ ├── bottom_bar_tab_pressed@2x.png │ │ │ ├── clear_search_text.png │ │ │ ├── clear_search_text@2x.png │ │ │ ├── gesture&voice_close_normal@2x.png │ │ │ ├── gesture&voice_close_pressed@2x.png │ │ │ ├── gesture&voice_setting_normal@2x.png │ │ │ ├── gesture&voice_setting_pressed@2x.png │ │ │ ├── gestureleft_btn_normal@2x.png │ │ │ ├── gestureleft_btn_selected@2x.png │ │ │ ├── gestureright_btn_normal@2x.png │ │ │ ├── gestureright_btn_selected@2x.png │ │ │ ├── ic_addTo_disable@2x.png │ │ │ ├── ic_addTo_normal@2x.png │ │ │ ├── ic_addTo_pressed@2x.png │ │ │ ├── ic_chrome_sync@2x.png │ │ │ ├── ic_chrome_sync_disable@2x.png │ │ │ ├── ic_cloud_tabs@2x.png │ │ │ ├── ic_cloud_tabs_disable@2x.png │ │ │ ├── ic_download_disable@2x.png │ │ │ ├── ic_download_normal@2x.png │ │ │ ├── ic_download_pressed@2x.png │ │ │ ├── ic_firefox_sync@2x.png │ │ │ ├── ic_firefox_sync_disable@2x.png │ │ │ ├── ic_gesture_normal@2x.png │ │ │ ├── ic_gesture_selected@2x.png │ │ │ ├── ic_more_disable@2x.png │ │ │ ├── ic_more_normal@2x.png │ │ │ ├── ic_more_pressed@2x.png │ │ │ ├── ic_privacy_disable@2x.png │ │ │ ├── ic_privacy_normal@2x.png │ │ │ ├── ic_privacy_pressed@2x.png │ │ │ ├── ic_setting_disable@2x.png │ │ │ ├── ic_setting_normal@2x.png │ │ │ ├── ic_setting_pressed@2x.png │ │ │ ├── ic_share_disable@2x.png │ │ │ ├── ic_share_normal@2x.png │ │ │ ├── ic_share_pressed@2x.png │ │ │ ├── ic_sonar_normal@2x.png │ │ │ ├── ic_sonar_selected@2x.png │ │ │ ├── ic_viaiblepassword_03@2x.png │ │ │ ├── ic_viaiblepassword_04_03@2x.png │ │ │ ├── mention_people@2x.png │ │ │ ├── mention_people_pressed@2x.png │ │ │ ├── mic_enable@2x.png │ │ │ ├── mic_forbidden@2x.png │ │ │ ├── pageDrop_persion_normal@2x 2.png │ │ │ ├── pageDrop_persion_normal@2x.png │ │ │ ├── pageDrop_persion_pressed@2x 2.png │ │ │ ├── pageDrop_persion_pressed@2x.png │ │ │ ├── post_icon_upload_photo_normal.png │ │ │ ├── post_icon_upload_photo_normal@2x.png │ │ │ ├── post_icon_upload_photo_pressed.png │ │ │ ├── post_icon_upload_photo_pressed@2x.png │ │ │ ├── rightsidebar_tab_close--disable@2x.png │ │ │ ├── rightsidebar_tab_close_selected--disable@2x.png │ │ │ ├── rightsidebar_tab_close_selected@2x.png │ │ │ ├── share_friend@2x.png │ │ │ ├── share_friend_disabled@2x.png │ │ │ ├── share_friend_pressed@2x.png │ │ │ ├── social_share_ic_more_normal@2x.png │ │ │ ├── social_share_ic_more_pressed@2x.png │ │ │ ├── view_more.png │ │ │ ├── view_more@2x.png │ │ │ ├── voice_icon_setting_notice.png │ │ │ ├── voice_icon_setting_notice@2x.png │ │ │ ├── voice_indicator_one@2x.png │ │ │ ├── voice_indicator_three@2x.png │ │ │ ├── voice_indicator_two@2x.png │ │ │ ├── volumn_loud@2x.png │ │ │ ├── volumn_middle@2x.png │ │ │ ├── volumn_none@2x.png │ │ │ └── volumn_slight@2x.png │ └── en.lproj │ │ └── Root.strings │ ├── HKVideoPlayerClassicalTheme.h │ ├── HKVideoPlayerClassicalTheme.m │ ├── HKVideoPlayerClassicalTheme.xib │ ├── HKVideoPlayerClassicalTheme_NonSizeClass.xib │ ├── HKVideoPlayerDefaultTheme.h │ ├── HKVideoPlayerDefaultTheme.m │ ├── HKVideoPlayerGreenTheme.h │ ├── HKVideoPlayerGreenTheme.m │ ├── HKVideoPlayerWinterTheme.h │ ├── HKVideoPlayerWinterTheme.m │ ├── HKVideoPlayerWoodenTheme.h │ └── HKVideoPlayerWoodenTheme.m ├── Images ├── Feature_Integrate_To_Control_Center.PNG └── Theme_default.png ├── LICENSE ├── README.md └── iOS Video Player ├── iOS Video Player.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── welcome.xcuserdatad │ └── xcschemes │ ├── iOS Video Player.xcscheme │ └── xcschememanagement.plist ├── iOS Video Player ├── Base.lproj │ ├── Main_iPad.storyboard │ └── Main_iPhone.storyboard ├── HKAppDelegate.h ├── HKAppDelegate.m ├── HKViewController.h ├── HKViewController.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── en.lproj │ └── InfoPlist.strings ├── iOS Video Player-Info.plist ├── iOS Video Player-Prefix.pch └── main.m └── iOS Video PlayerTests ├── en.lproj └── InfoPlist.strings ├── iOS Video PlayerTests-Info.plist └── iOS_Video_PlayerTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /Classes/3rd-Parties/UIView+MHNibLoading.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+NibLoading.h 3 | // 4 | // 5 | // Created by Matthew Hupman on 5/16/12. 6 | // Copyright (c) 2012 Citrrus. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (NibLoading) 12 | 13 | + (UINib *)loadNib; 14 | + (UINib *)loadNibNamed:(NSString*)nibName; 15 | + (UINib *)loadNibNamed:(NSString*)nibName bundle:(NSBundle *)bundle; 16 | + (instancetype)loadInstanceFromNib; 17 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName; 18 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner; 19 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner bundle:(NSBundle *)bundle; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/3rd-Parties/UIView+MHNibLoading.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+NibLoading.m 3 | // 4 | // 5 | // Created by Matthew Hupman on 5/16/12. 6 | // Copyright (c) 2012 Citrrus. All rights reserved. 7 | // 8 | 9 | #import "UIView+MHNibLoading.h" 10 | 11 | @implementation UIView (NibLoading) 12 | 13 | + (UINib *)loadNib 14 | { 15 | return [self loadNibNamed:NSStringFromClass([self class])]; 16 | } 17 | 18 | + (UINib *)loadNibNamed:(NSString*)nibName 19 | { 20 | return [self loadNibNamed:nibName bundle:[NSBundle mainBundle]]; 21 | } 22 | 23 | + (UINib *)loadNibNamed:(NSString*)nibName bundle:(NSBundle *)bundle 24 | { 25 | return [UINib nibWithNibName:nibName bundle:bundle]; 26 | } 27 | 28 | + (instancetype)loadInstanceFromNib 29 | { 30 | return [self loadInstanceFromNibWithName:NSStringFromClass([self class])]; 31 | } 32 | 33 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName 34 | { 35 | return [self loadInstanceFromNibWithName:nibName owner:nil]; 36 | } 37 | 38 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner 39 | { 40 | return [self loadInstanceFromNibWithName:nibName owner:owner bundle:[NSBundle mainBundle]]; 41 | } 42 | 43 | + (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner bundle:(NSBundle *)bundle 44 | { 45 | UIView *result = nil; 46 | NSArray* elements = [bundle loadNibNamed:nibName owner:owner options:nil]; 47 | 48 | for (id object in elements) 49 | { 50 | if ([object isKindOfClass:[self class]]) 51 | { 52 | result = object; 53 | break; 54 | } 55 | } 56 | 57 | return result; 58 | } 59 | 60 | @end -------------------------------------------------------------------------------- /Classes/Core/HKLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKLog.h 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/28/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HKLog : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Core/HKLog.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKLog.m 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/28/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKLog.h" 10 | 11 | @implementation HKLog 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Core/HKUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKUtility.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 12/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define DEVICE_IS_IPHONE() (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone) 12 | #define DEVICE_IS_IPAD() (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) 13 | 14 | #define SYSTEM_VERSION [[UIDevice currentDevice] systemVersion] 15 | #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) 16 | #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) 17 | #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 18 | #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) 19 | #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) 20 | 21 | 22 | @interface HKUtility : NSObject 23 | 24 | +(NSString*) iOSVersion; 25 | +(UIDeviceOrientation) currentOrientation; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/Core/HKUtility.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKUtility.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 12/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKUtility.h" 10 | 11 | @implementation HKUtility 12 | 13 | +(NSString *)iOSVersion 14 | { 15 | return SYSTEM_VERSION; 16 | } 17 | 18 | +(UIDeviceOrientation)currentOrientation 19 | { 20 | UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; 21 | return orientation; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerCoreView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerCoreView.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "HKVideoPlayerFuntionality.h" 12 | 13 | @class HKVideoPlayerViewController; 14 | 15 | @protocol HKVideoPlayerCoreView 16 | 17 | @property(nonatomic,weak,readonly) HKVideoPlayerViewController *playerViewController; 18 | @property(nonatomic,strong)AVPlayer *avPlayer; 19 | @property(nonatomic,strong)AVAsset *avAsset; 20 | 21 | - (void)setPlayer:(AVPlayer*)player; 22 | - (NSString*)getVideoFillMode; 23 | - (void)setVideoFillMode:(NSString *)fillMode; 24 | - (void)beginViewSessionWithUrl:(NSURL *)url; 25 | - (void)clearViewSession; 26 | 27 | @end 28 | 29 | @interface HKVideoPlayerCoreView : UIView 30 | 31 | 32 | @property(nonatomic,assign,readonly)AVKeyValueStatus avStatus; 33 | 34 | -(instancetype)initWithPlayerVC:(HKVideoPlayerViewController*)playerVC; 35 | 36 | -(double)getDurationTime; 37 | -(NSString*)getDurationTimeString; 38 | -(double)getCurrentTime; 39 | -(NSString*)getCurrentTimeString; 40 | -(double)getRemainTime; 41 | -(NSString*)getRemainTimeString; 42 | 43 | @end 44 | 45 | @interface HKVideoPlayerCoreView(CaptureFeature) 46 | 47 | -(void)captureVideo; 48 | -(void)captureVideoDoneWithFilePath:(NSURL*)filePath; 49 | -(void)captureAudio; 50 | -(void)captureAudioDoneWithFilePath:(NSURL*)filepath; 51 | 52 | @end 53 | 54 | @interface HKVideoPlayerCoreView(DetectiveFeature) 55 | 56 | -(void)autoDectectFaceWithIntervalTime:(NSTimeInterval)intervalTime activate:(BOOL)activated; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerCoreView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerCoreView.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerCoreView.h" 10 | #import "HKVideoPlayerViewController.h" 11 | #import "HKVideoPlayerException.h" 12 | 13 | #define DEFAULT_COLOR_BACKGROUND [UIColor blackColor] 14 | 15 | @interface HKVideoPlayerCoreView () 16 | 17 | @property(nonatomic) id playerTimeObserver; 18 | // Scrubbing 19 | @property (nonatomic, assign, getter = isScrubbing) BOOL scrubbing; 20 | @property (nonatomic, assign) float restoreAfterScrubbingRate; 21 | 22 | @end 23 | 24 | @implementation HKVideoPlayerCoreView 25 | 26 | @synthesize avAsset=_avAsset; 27 | @synthesize avPlayer=_avPlayer; 28 | @synthesize playerViewController=_playerViewController; 29 | 30 | - (instancetype)init 31 | { 32 | self = [super init]; 33 | if (self) { 34 | [self initCore]; 35 | } 36 | return self; 37 | } 38 | 39 | - (instancetype)initWithFrame:(CGRect)frame 40 | { 41 | self = [super initWithFrame:frame]; 42 | if (self) { 43 | // Initialization code 44 | [self initCore]; 45 | } 46 | return self; 47 | } 48 | 49 | -(instancetype)initWithPlayerVC:(HKVideoPlayerViewController *)playerVC 50 | { 51 | self = [self initWithFrame:playerVC.view.bounds]; 52 | if (self) { 53 | // Initialization code 54 | _playerViewController = playerVC; 55 | [self applyPlayerEdgeInsets:[playerVC playerGetConfigInsets]]; 56 | } 57 | return self; 58 | } 59 | 60 | -(void)applyPlayerEdgeInsets:(UIEdgeInsets)insets 61 | { 62 | if(!UIEdgeInsetsEqualToEdgeInsets(insets, UIEdgeInsetsZero)) 63 | { 64 | CGSize newSize =CGSizeMake(self.bounds.size.width-insets.left-insets.right, self.bounds.size.height-insets.top-insets.bottom); 65 | self.bounds = CGRectMake(0, 0, newSize.width, newSize.height); 66 | // self.center = playerVC.view.center; 67 | CGFloat adjustVerticalInset = insets.top-insets.bottom; 68 | if(adjustVerticalInset>0) 69 | { 70 | self.center = CGPointMake(self.center.x,self.center.y + fabs(adjustVerticalInset/2)); 71 | } 72 | else if(adjustVerticalInset<0) 73 | { 74 | self.center = CGPointMake(self.center.x,self.center.y - fabs(adjustVerticalInset/2)); 75 | } 76 | 77 | CGFloat adjustHorizontalInset = insets.left-insets.right; 78 | if(adjustHorizontalInset>0) 79 | { 80 | self.center = CGPointMake(self.center.x + fabs(adjustHorizontalInset/2),self.center.y); 81 | } 82 | else if(adjustHorizontalInset<0) 83 | { 84 | self.center = CGPointMake(self.center.x - fabs(adjustHorizontalInset/2),self.center.y); 85 | } 86 | }else 87 | { 88 | // self.center=_playerViewController.view.center; 89 | // self.bounds=_playerViewController.view.bounds; 90 | } 91 | } 92 | 93 | -(void)initCore 94 | { 95 | // self.backgroundColor = DEFAULT_COLOR_BACKGROUND; 96 | 97 | 98 | } 99 | 100 | #pragma mark - Scrubb 101 | 102 | -(double)getDurationTime 103 | { 104 | double durationSeconds = ceil(CMTimeGetSeconds(self.player.currentItem.duration)); 105 | return durationSeconds; 106 | } 107 | 108 | -(NSString *)getDurationTimeString 109 | { 110 | NSInteger durationSeconds = ceilf(CMTimeGetSeconds(self.player.currentItem.duration)); 111 | NSInteger seconds = durationSeconds % 60; 112 | NSInteger minutes = durationSeconds / 60; 113 | NSInteger hours = minutes / 60; 114 | 115 | NSString * durationTime = [NSString stringWithFormat:@"%02ld:%02ld:%02ld", (long)hours, (long)minutes, (long)seconds]; 116 | return durationTime; 117 | } 118 | 119 | -(double) getRemainTime 120 | { 121 | return [self getDurationTime] - [self getCurrentTime]; 122 | } 123 | 124 | -(NSString *)getRemainTimeString 125 | { 126 | NSInteger currentSeconds = ceilf(CMTimeGetSeconds(self.avPlayer.currentTime)); 127 | 128 | NSInteger duration = ceilf(CMTimeGetSeconds(self.avPlayer.currentItem.duration)); 129 | NSInteger remainSeconds = duration-currentSeconds; 130 | NSInteger durationSeconds = remainSeconds % 60; 131 | NSInteger durationMinutes = remainSeconds / 60; 132 | NSInteger durationHours = durationMinutes / 60; 133 | 134 | NSString *remainTime = [NSString stringWithFormat:@"-%02ld:%02ld:%02ld", (long)durationHours, (long)durationMinutes, (long)durationSeconds]; 135 | return remainTime; 136 | } 137 | 138 | -(double)getCurrentTime 139 | { 140 | return ceil(CMTimeGetSeconds(self.avPlayer.currentTime)); 141 | } 142 | 143 | -(NSString *)getCurrentTimeString 144 | { 145 | NSInteger currentSeconds = ceilf(CMTimeGetSeconds(self.avPlayer.currentTime)); 146 | NSInteger seconds = currentSeconds % 60; 147 | NSInteger minutes = currentSeconds / 60; 148 | NSInteger hours = minutes / 60; 149 | 150 | NSString * currentTime = [NSString stringWithFormat:@"%02ld:%02ld:%02ld", (long)hours, (long)minutes, (long)seconds]; 151 | return currentTime; 152 | } 153 | 154 | 155 | 156 | /* 157 | // Only override drawRect: if you perform custom drawing. 158 | // An empty implementation adversely affects performance during animation. 159 | - (void)drawRect:(CGRect)rect 160 | { 161 | // Drawing code 162 | } 163 | */ 164 | 165 | + (Class)layerClass 166 | { 167 | return [AVPlayerLayer class]; 168 | } 169 | 170 | - (AVPlayer*)player 171 | { 172 | return [(AVPlayerLayer*)[self layer] player]; 173 | } 174 | 175 | - (void)setPlayer:(AVPlayer*)player 176 | { 177 | _avPlayer = player; 178 | [(AVPlayerLayer*)[self layer] setPlayer:_avPlayer]; 179 | } 180 | 181 | /* Specifies how the video is displayed within a player layer’s bounds. 182 | (AVLayerVideoGravityResizeAspect is default) */ 183 | - (void)setVideoFillMode:(NSString *)fillMode 184 | { 185 | [UIView animateWithDuration:0 animations:^{ 186 | //TODO 187 | } completion:^(BOOL finished) { 188 | AVPlayerLayer *playerLayer = (AVPlayerLayer*)[self layer]; 189 | playerLayer.videoGravity = fillMode; 190 | }]; 191 | } 192 | - (NSString * )getVideoFillMode 193 | { 194 | AVPlayerLayer *playerLayer = (AVPlayerLayer*)[self layer]; 195 | return playerLayer.videoGravity; 196 | } 197 | 198 | NSTimer *avStatusTimer; 199 | 200 | -(void)monitoringAVStatus 201 | { 202 | NSError *error = nil; 203 | AVKeyValueStatus avStatus = [_avAsset statusOfValueForKey:@"tracks" error:&error]; 204 | switch (avStatus) { 205 | case AVKeyValueStatusUnknown: 206 | 207 | //TODO 208 | 209 | break; 210 | case AVKeyValueStatusLoading: 211 | 212 | //TODO 213 | _avStatus = avStatus; 214 | 215 | break; 216 | 217 | case AVKeyValueStatusFailed: 218 | case AVKeyValueStatusCancelled: 219 | case AVKeyValueStatusLoaded: 220 | 221 | //TODO - do nothing 222 | 223 | break; 224 | } 225 | } 226 | 227 | -(void)clearViewSession 228 | { 229 | [_avAsset cancelLoading]; 230 | //TODO - remove other obersevers of player, playerItem, playerAsset 231 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 232 | } 233 | 234 | -(void)beginViewSessionWithUrl:(NSURL *)url 235 | { 236 | self.avAsset = [AVAsset assetWithURL:url]; 237 | 238 | avStatusTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(monitoringAVStatus) userInfo:nil repeats:YES]; 239 | [avStatusTimer fire]; 240 | 241 | [_avAsset loadValuesAsynchronouslyForKeys:@[@"tracks",@"lyrics",@"creationDate",@"commonMetadata",@"availableMetadataFormats"] completionHandler:^{ 242 | 243 | [avStatusTimer invalidate]; 244 | 245 | NSError *error = nil; 246 | _avStatus = [_avAsset statusOfValueForKey:@"tracks" error:&error]; 247 | 248 | if(error) 249 | { 250 | [_playerViewController playerDidFailure]; 251 | return; 252 | } 253 | 254 | switch (_avStatus) { 255 | 256 | case AVKeyValueStatusUnknown: 257 | 258 | //TODO - do nothing 259 | 260 | break; 261 | case AVKeyValueStatusLoading: 262 | 263 | //TODO - do nothing 264 | 265 | break; 266 | 267 | case AVKeyValueStatusFailed: 268 | 269 | [_playerViewController playerDidFailure]; 270 | 271 | break; 272 | case AVKeyValueStatusCancelled: 273 | 274 | //TODO 275 | 276 | break; 277 | 278 | case AVKeyValueStatusLoaded: 279 | 280 | _avPlayer = [[AVPlayer alloc] initWithPlayerItem:[AVPlayerItem playerItemWithAsset:_avAsset]]; 281 | [self setupObservingPlayer]; 282 | [self setPlayer:_avPlayer]; 283 | [_playerViewController setCurrentSpeed:self.avPlayer.rate]; 284 | [_playerViewController playerDidLoad]; 285 | [self syncScrobber]; 286 | 287 | break; 288 | } 289 | 290 | }]; 291 | 292 | } 293 | 294 | static NSString * kPlayerStatus = @"status"; 295 | static NSString * kPlayerError = @"error"; 296 | static NSString * kPlayerRate = @"rate"; 297 | static NSString * kPlayerCurrentTime = @"currentTime"; 298 | static NSString * kPlayerVolume = @"volume"; 299 | static NSString * kPlayerMuted = @"muted"; 300 | static NSString * kPlayerCurrentTIme = @"currentTime"; 301 | 302 | -(void)setupObservingPlayer 303 | { 304 | AVPlayer *avPlayer = _avPlayer; 305 | [avPlayer addObserver:self forKeyPath:kPlayerStatus options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 306 | [avPlayer addObserver:self forKeyPath:kPlayerError options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 307 | [avPlayer addObserver:self forKeyPath:kPlayerRate options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 308 | [avPlayer addObserver:self forKeyPath:kPlayerCurrentTime options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 309 | [avPlayer addObserver:self forKeyPath:kPlayerVolume options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 310 | [avPlayer addObserver:self forKeyPath:kPlayerMuted options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 311 | [avPlayer addObserver:self forKeyPath:kPlayerCurrentTIme options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:@selector(setupObservingPlayer)]; 312 | 313 | } 314 | 315 | static NSString * kItemStatus = @"status"; 316 | static NSString * kItemError = @"error"; 317 | static NSString * kItemDuration = @"duration"; 318 | static NSString * kItemTracks = @"tracks"; 319 | static NSString * kItemAsset = @"asset"; 320 | 321 | 322 | -(void)setupObservingPlayerItem 323 | { 324 | AVPlayerItem *avItem = _avPlayer.currentItem; 325 | } 326 | 327 | -(void)setupObservingPlayerAsset 328 | { 329 | AVAsset *avAsset = _avPlayer.currentItem.asset; 330 | } 331 | 332 | -(void)setupNotificationOfPlayerItem 333 | { 334 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemTimeJumpedNotification:) name:AVPlayerItemTimeJumpedNotification object:nil]; 335 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemDidPlayToEndTimeNotification:) name:AVPlayerItemDidPlayToEndTimeNotification object:nil]; 336 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemFailedToPlayToEndTimeNotification:) name:AVPlayerItemFailedToPlayToEndTimeNotification object:nil]; 337 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemPlaybackStalledNotification:) name:AVPlayerItemPlaybackStalledNotification object:nil]; 338 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemNewAccessLogEntryNotification:) name:AVPlayerItemNewAccessLogEntryNotification object:nil]; 339 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemNewErrorLogEntryNotification:) name:AVPlayerItemNewErrorLogEntryNotification object:nil]; 340 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AVPlayerItemFailedToPlayToEndTimeErrorKey:) name:AVPlayerItemFailedToPlayToEndTimeErrorKey object:nil]; 341 | } 342 | // AVPlayerItemTimeJumpedNotification 343 | -(void)AVPlayerItemTimeJumpedNotification:(NSNotification*) notification 344 | { 345 | 346 | } 347 | // AVPlayerItemDidPlayToEndTimeNotification 348 | -(void)AVPlayerItemDidPlayToEndTimeNotification:(NSNotification*) notification 349 | { 350 | 351 | } 352 | // AVPlayerItemFailedToPlayToEndTimeNotification 353 | -(void)AVPlayerItemFailedToPlayToEndTimeNotification:(NSNotification*) notification 354 | { 355 | 356 | } 357 | // // media did not arrive in time to continue playback 358 | -(void)AVPlayerItemPlaybackStalledNotification:(NSNotification*) notification 359 | { 360 | 361 | } 362 | // // a new access log entry has been added 363 | -(void)AVPlayerItemNewAccessLogEntryNotification:(NSNotification*) notification 364 | { 365 | 366 | } 367 | // // a new error log entry has been added 368 | -(void)AVPlayerItemNewErrorLogEntryNotification:(NSNotification*) notification 369 | { 370 | 371 | } 372 | // // notification userInfo key type 373 | // // NSError 374 | -(void)AVPlayerItemFailedToPlayToEndTimeErrorKey:(NSNotification*) notification 375 | { 376 | 377 | } 378 | 379 | -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 380 | { 381 | 382 | id oldObj = [change valueForKeyPath:NSKeyValueChangeOldKey]; 383 | id newObj = [change valueForKeyPath:NSKeyValueChangeNewKey]; 384 | 385 | if(object==_avPlayer) 386 | { 387 | if([keyPath isEqualToString:kPlayerRate]) 388 | { 389 | NSNumber * newValue = newObj; 390 | NSNumber * oldValue = oldObj; 391 | } 392 | else if([keyPath isEqualToString:kPlayerMuted]) 393 | { 394 | 395 | } 396 | else if([keyPath isEqualToString:kPlayerVolume]) 397 | { 398 | 399 | } 400 | else if([keyPath isEqualToString:kPlayerCurrentTIme]) 401 | { 402 | 403 | } 404 | } 405 | } 406 | 407 | -(void)handlePlay 408 | { 409 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 410 | [self addPlayerTimeObserver]; 411 | [_avPlayer play]; 412 | [_playerViewController playerDidPlay]; 413 | } 414 | 415 | -(void)handlePause 416 | { 417 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 418 | [self removePlayerTimeObserver]; 419 | [_avPlayer pause]; 420 | [_playerViewController playerDidPause]; 421 | } 422 | 423 | -(void)handleRewind:(float)speed 424 | { 425 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 426 | [_avPlayer setRate:speed]; 427 | 428 | [_playerViewController playerDidRewind:speed]; 429 | } 430 | 431 | -(void)handleFastforward:(float)speed 432 | { 433 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 434 | [_avPlayer setRate:speed]; 435 | 436 | [_playerViewController playerDidFastforward:speed]; 437 | } 438 | -(void)handleStop 439 | { 440 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 441 | [_avPlayer pause]; 442 | [_avPlayer seekToTime:kCMTimeZero]; 443 | [self removePlayerTimeObserver]; 444 | [_playerViewController playerDidStop]; 445 | } 446 | 447 | -(void)handleCloseView 448 | { 449 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 450 | [_avPlayer pause]; 451 | [self removePlayerTimeObserver]; 452 | // Remove all observers. 453 | 454 | 455 | NSArray *oserverPaths = @[kPlayerRate,kPlayerError,kPlayerMuted,kPlayerStatus,kPlayerVolume,kPlayerCurrentTIme,kPlayerCurrentTime]; 456 | 457 | for (NSString *path in oserverPaths) { 458 | [_avPlayer removeObserver:self 459 | forKeyPath:path]; 460 | 461 | } 462 | 463 | // NSArray *observerPaths = @[kItemAsset,kItemError,kItemStatus,kItemTracks,kItemDuration]; 464 | // 465 | // for (NSString *path in observerPaths) { 466 | // [_avPlayer removeObserver:self 467 | // forKeyPath:path]; 468 | // } 469 | 470 | 471 | [_playerViewController playerDidCloseView]; 472 | } 473 | 474 | -(void)handleResumeTime:(float)second 475 | { 476 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 477 | [self playbackEndScrub]; 478 | [self playbackScrub:second]; 479 | [self playbackBeginScrub]; 480 | } 481 | 482 | - (void)addPlayerTimeObserver { 483 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 484 | if (!_playerTimeObserver) { 485 | __unsafe_unretained HKVideoPlayerCoreView *weakSelf = self; 486 | id observer = [self.avPlayer addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(.5, NSEC_PER_SEC) 487 | queue:dispatch_get_main_queue() 488 | usingBlock:^(CMTime time) { 489 | 490 | HKVideoPlayerCoreView *strongSelf = weakSelf; 491 | if (CMTIME_IS_VALID(strongSelf.avPlayer.currentTime) && CMTIME_IS_VALID(strongSelf.avPlayer.currentItem.duration)) 492 | [strongSelf syncScrobber]; 493 | }]; 494 | 495 | [self setPlayerTimeObserver:observer]; 496 | } 497 | } 498 | 499 | - (void)removePlayerTimeObserver { 500 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 501 | if (_playerTimeObserver) { 502 | [self.avPlayer removeTimeObserver:self.playerTimeObserver]; 503 | [self setPlayerTimeObserver:nil]; 504 | } 505 | } 506 | 507 | - (void)playbackBeginScrub { 508 | if(_scrubbing) 509 | return; 510 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 511 | [self removePlayerTimeObserver]; 512 | [self setScrubbing:YES]; 513 | [self setRestoreAfterScrubbingRate:self.avPlayer.rate]; 514 | [self.avPlayer pause]; 515 | } 516 | BOOL didSeek=YES; 517 | - (void)playbackScrub:(float)scrubTime { 518 | if(!CMTIME_IS_VALID(CMTimeMakeWithSeconds(scrubTime, NSEC_PER_SEC))) 519 | return; 520 | if(!didSeek) 521 | return; 522 | // didSeek = NO; 523 | NSLog(@"HK >>> %s scrubTime:%f",__PRETTY_FUNCTION__,scrubTime); 524 | [_playerViewController playerDidBeginChangePlayback]; 525 | CMTime time = CMTimeMakeWithSeconds(scrubTime, NSEC_PER_SEC); 526 | [_avPlayer seekToTime:time completionHandler:^(BOOL finished) { 527 | // didSeek=YES; 528 | [_playerViewController playerDidEndChangePlayback]; 529 | }]; 530 | } 531 | 532 | - (void)playbackEndScrub { 533 | if(!_scrubbing) 534 | return; 535 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 536 | [self.avPlayer setRate:self.restoreAfterScrubbingRate]; 537 | [self setScrubbing:NO]; 538 | [self addPlayerTimeObserver]; 539 | } 540 | 541 | - (void)syncScrobber { 542 | NSLog(@"HK >>> %s",__PRETTY_FUNCTION__); 543 | NSInteger current = ceilf(CMTimeGetSeconds(self.avPlayer.currentTime)); 544 | NSInteger duration = ceilf(CMTimeGetSeconds(self.avPlayer.currentItem.duration)); 545 | NSInteger remain = duration-current; 546 | 547 | [_playerViewController playerDidUpdateCurrentTime:current remainTime:remain durationTime:duration]; 548 | 549 | NSLog(@"%@", self.player.currentItem.seekableTimeRanges); 550 | } 551 | 552 | #pragma mark - Handle touches 553 | // 554 | //-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 555 | //{ 556 | // [self.playerViewController touchesBegan:touches withEvent:event]; 557 | //} 558 | // 559 | //-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 560 | //{ 561 | // [self.playerViewController touchesEnded:touches withEvent:event]; 562 | //} 563 | // 564 | //-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 565 | //{ 566 | // [self.playerViewController touchesMoved:touches withEvent:event]; 567 | //} 568 | // 569 | //-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 570 | //{ 571 | // [self.playerViewController touchesCancelled:touches withEvent:event]; 572 | //} 573 | // 574 | //#pragma mark - Handle motions 575 | // 576 | //-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event 577 | //{ 578 | // [self.playerViewController motionBegan:motion withEvent:event]; 579 | //} 580 | //-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event 581 | //{ 582 | // [self.playerViewController motionEnded:motion withEvent:event]; 583 | //} 584 | //-(void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event 585 | //{ 586 | // [self.playerViewController motionCancelled:motion withEvent:event]; 587 | //} 588 | // 589 | //#pragma mark - Handle remote control 590 | // 591 | //-(void)remoteControlReceivedWithEvent:(UIEvent *)event 592 | //{ 593 | // [self.playerViewController remoteControlReceivedWithEvent:event]; 594 | //} 595 | // 596 | 597 | @end 598 | 599 | @implementation HKVideoPlayerCoreView (CaptureFeature) 600 | 601 | AVCaptureSession *_captureSession; 602 | AVCaptureDeviceInput *_captureDeviceInput; 603 | 604 | -(void)captureVideo 605 | { 606 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 607 | 608 | NSError *error = nil; 609 | _captureDeviceInput = [AVCaptureDeviceInput deviceInputWithDevice:[AVCaptureDevice defaultDeviceWithMediaType:@"AVMediaTypeMuxed"] error:&error]; 610 | _captureSession = [[AVCaptureSession alloc] init]; 611 | [_captureSession startRunning]; 612 | } 613 | -(void)captureVideoDoneWithFilePath:(NSURL *)filePath 614 | { 615 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 616 | [_captureSession stopRunning]; 617 | } 618 | 619 | -(void)captureAudio 620 | { 621 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 622 | } 623 | -(void)captureAudioDoneWithFilePath:(NSURL *)filepath 624 | { 625 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 626 | } 627 | 628 | @end 629 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerCoreViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerCoreViewDelegate.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol HKVideoPlayerCoreViewDelegate 12 | 13 | -(void) playerWillLoad; 14 | -(void) playerDidLoad; 15 | -(void) playerDidFailure; 16 | -(void) playerDidReady; 17 | -(void) playerDidPlay; 18 | -(void) playerDidStop; 19 | -(void) playerDidPause; 20 | -(void) playerDidEnterFullscreen; 21 | -(void) playerDidExitFullscreen; 22 | -(void) playerDidRewind:(float)speed; 23 | -(void) playerDidForward:(float)speed; 24 | -(void) playerDidUpdatePosition:(float)position; 25 | -(void) playerDidCloseView; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerCoreDelegate.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | Implemented by HKVideoPlayerThemeView abstract class 13 | Flow: CoreView ->[invoke]-> ViewController ->[invoke]-> ThemeView 14 | */ 15 | @protocol HKVideoPlayerThemeViewRequirementDelegate 16 | 17 | -(BOOL) themeViewAllowDraggableAtPosition:(CGPoint)postion; 18 | -(BOOL) themeViewAllowResizeWithFrame:(CGRect)frame; 19 | 20 | -(BOOL) themeViewRequireClipsToBounds; 21 | +(BOOL) themeViewRequireStatusBar; 22 | +(UIColor*) themeViewRequireViewControllerBackgroundColor; 23 | +(UIColor*) themeViewRequireCoreViewBackgroundColor; 24 | +(BOOL) themeViewShouldSupportIpadnIphone; 25 | +(BOOL) themeViewShouldSupportIpad; 26 | +(BOOL) themeViewShouldSupportIphone; 27 | 28 | #pragma mark - Support interview orientation 29 | 30 | +(NSUInteger) themeViewSupportedInterfaceOrientations; 31 | +(BOOL) themeViewShouldAutorotate; 32 | // You do not need this method if you are not supporting earlier iOS Versions 33 | +(BOOL) themeViewShouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; 34 | 35 | 36 | +(CGSize) themeViewPreferedSize; 37 | 38 | @end 39 | 40 | /** 41 | Implemented by HKVideoPlayerThemeView abstract class as well as HKVideoPlayerViewController 42 | Flow: CoreView ->[invoke]-> ViewController ->[invoke]-> ThemeView 43 | */ 44 | @protocol HKVideoPlayerCoreEventDelegate 45 | 46 | -(UIEdgeInsets)playerGetConfigInsets; 47 | 48 | @end 49 | 50 | /** 51 | Implemented by HKVideoPlayerThemeView abstract class 52 | Flow: ViewController ->[invoke]-> ThemeView 53 | */ 54 | @protocol HKVideoPlayerPreEventDelegate 55 | 56 | -(void) playerWillChangeVolume:(float)volume; 57 | -(void) playerWillLoad; 58 | -(void) playerWillPlay; 59 | -(void) playerWillStop; 60 | -(void) playerWillPause; 61 | -(void) playerWillEnterFullscreen; 62 | -(void) playerWillExitFullscreen; 63 | -(void) playerWillRewind:(float)speed DEPRECATED_MSG_ATTRIBUTE("Deprecated now"); 64 | -(void) playerWillFastforward:(float)speed DEPRECATED_MSG_ATTRIBUTE("Deprecated now"); 65 | -(void) playerWillUpdateTime:(float)second DEPRECATED_MSG_ATTRIBUTE("Deprecated now"); 66 | -(void) playerWillCloseView; 67 | 68 | -(void) playerWillResizeWithFrame:(CGRect)frame; 69 | -(void) playerWillChangeOrientation:(UIInterfaceOrientation)interfaceOrientation; 70 | 71 | @end 72 | 73 | /** 74 | Implemented by HKVideoPlayerThemeView abstract class as well as HKVideoPlayerViewController 75 | Flow: CoreView ->[invoke]-> ViewController ->[invoke]-> ThemeView 76 | */ 77 | @protocol HKVideoPlayerPostEventDelegate 78 | 79 | -(void) playerDidChangeVolume:(float)volume; 80 | -(void) playerDidRenderLoadingAnimation; 81 | -(void) playerDidRenderView; 82 | -(void) playerDidLoad; 83 | -(void) playerDidFailure; 84 | -(void) playerDidReady; 85 | -(void) playerDidPlay; 86 | -(void) playerDidStop; 87 | -(void) playerDidPause; 88 | -(void) playerDidEnterFullscreen; 89 | -(void) playerDidExitFullscreen; 90 | -(void) playerDidRewind:(float)speed; 91 | -(void) playerDidFastforward:(float)speed; 92 | -(void) playerDidUpdateTime:(float)second DEPRECATED_MSG_ATTRIBUTE("Deprecated now, please use playerDidUpdateCurrentTime:remainTime:durationTime: instead"); 93 | 94 | -(void) playerDidUpdateCurrentTime:(float)currentTime remainTime:(float)remainTime durationTime:(float)durationTime; 95 | -(void) playerDidCloseView; 96 | -(void) playerDidResizeWithFrame:(CGRect)frame; 97 | -(void) playerDidBeginChangePlayback; 98 | -(void) playerDidEndChangePlayback; 99 | -(void) playerDidChangeOrientation:(UIInterfaceOrientation)interfaceOrientation; 100 | 101 | @end -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerException.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerException.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/23/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET() [HKVideoPlayerException notImplementedYetExceptionAtFunction:__PRETTY_FUNCTION__] 12 | 13 | #define HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(message) [HKVideoPlayerException notImplementedYetExceptionAtFunction:__PRETTY_FUNCTION__] 14 | 15 | @interface HKVideoPlayerException : NSException 16 | 17 | +(void) notImplementedYetExceptionAtFunction:(const char*) function; 18 | +(void) notImplementedYetExceptionAtFunction:(const char*) function withMessage:(NSString *)message; 19 | @end 20 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerException.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerException.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/23/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerException.h" 10 | 11 | @implementation HKVideoPlayerException 12 | 13 | +(void)notImplementedYetExceptionAtFunction:(const char *)function 14 | { 15 | [self notImplementedYetExceptionAtFunction:function withMessage:nil]; 16 | } 17 | 18 | +(void)notImplementedYetExceptionAtFunction:(const char *)function withMessage:(NSString *)message 19 | { 20 | NSException *ex = [NSException exceptionWithName:@"NotImplementedYetExcepttion" reason:[NSString stringWithFormat:@"Please implement method %s",function] userInfo:@{@"message":message?message:@"",@"stacktrace":[NSThread callStackSymbols]}]; 21 | 22 | 23 | // NSLog(@"%@",[NSString stringWithFormat:@"NotImplementedYetExcepttion >>> %@",[NSString stringWithFormat:@"Please implement method %s",function]]); 24 | NSLog(@"%@",ex); 25 | 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerFuntionality.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerCore.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol HKVideoPlayerFuntionality 12 | 13 | -(void)handleCloseView; 14 | 15 | -(void)handlePlay; 16 | -(void)handleStop; 17 | -(void)handlePause; 18 | -(void)handleRewind:(float)speed; 19 | -(void)handleFastforward:(float)speed; 20 | -(void)handleResumeTime:(float)second; 21 | 22 | -(void)handleEnterFullscreen; 23 | -(void)handleExitFullscreen; 24 | -(void)handleResizeWithFrame:(CGRect)frame; 25 | 26 | 27 | -(void)playbackBeginScrub; 28 | -(void)playbackEndScrub; 29 | -(void)playbackScrub:(float)scrubTime; 30 | -(void)playbackSynScrub; 31 | 32 | -(void)volumeScrub:(float)volume; 33 | 34 | @end -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerNotifications.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerNotifications.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | 10 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerThemeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerThemeView.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HKVideoPlayerEvent.h" 11 | #import "UIView+MHNibLoading.h" 12 | 13 | @class HKVideoPlayerViewController; 14 | @class HKVideoPlayerThemeView; 15 | @protocol HKVideoPlayerThemeView 16 | 17 | @property(nonatomic,weak,readonly)HKVideoPlayerViewController *playerVC; 18 | 19 | -(void)renderThemeOnPlayerVC:(HKVideoPlayerViewController*)playerVC; 20 | -(void)renderLoadingOnPlayerVC:(HKVideoPlayerViewController*)playerVC; 21 | -(void)renderThemeAssetOnPlayerVC:(HKVideoPlayerViewController*)playerVC; 22 | -(void)setEventHandler __deprecated_msg("This is deprecated now"); 23 | -(void)showThemeView:(BOOL)animated; 24 | -(void)hideThemeView:(BOOL)animated; 25 | -(void)showLoadingAnimation; 26 | -(void)hideLoadingAnimation; 27 | -(void)changeToDisableState; 28 | -(void)changeToNormalState; 29 | 30 | +(instancetype) theme; 31 | 32 | @end 33 | 34 | @interface HKVideoPlayerThemeView : UIView 35 | 36 | @property(nonatomic,strong)NSString * playerTitle; 37 | @property(nonatomic,strong)NSString * playerSubTitle; 38 | 39 | @end 40 | 41 | 42 | @interface HKVideoPlayerThemeView(Assets) 43 | 44 | +(NSString*)specifyDefaultBundle; 45 | +(UIImage*)getAssetImageWithName:(NSString*)fileName; 46 | +(UIImage*)getAssetImageWithName:(NSString*)fileName bundle:(NSString*)bundleName; 47 | 48 | +(NSString *)timeStringFromSeconds:(float)secondsValue; 49 | 50 | +(UIImage *)imageFromText:(NSString *)text; 51 | 52 | @end 53 | 54 | @interface HKVideoPlayerThemeView(NibLoading) 55 | 56 | +(BOOL)isNibBasedTheme; 57 | +(NSString*)nibName; 58 | +(NSBundle*)nibBundle; 59 | +(UIView*)nibView; 60 | 61 | @end -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerThemeView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerThemeView.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | #import "HKVideoPlayerNotifications.h" 11 | #import "HKVideoPlayerException.h" 12 | #import "HKVideoPlayerViewController.h" 13 | #import "HKUtility.h" 14 | @interface HKVideoPlayerThemeView () 15 | 16 | @property(nonatomic)UIActivityIndicatorView * indicator; 17 | 18 | @end 19 | 20 | @implementation HKVideoPlayerThemeView (NibLoading) 21 | 22 | +(BOOL)isNibBasedTheme 23 | { 24 | return NO; 25 | } 26 | 27 | +(NSString *)nibName 28 | { 29 | if(![[self class] isNibBasedTheme]) 30 | return nil; 31 | 32 | return NSStringFromClass([self class]); 33 | } 34 | 35 | +(NSBundle*)nibBundle 36 | { 37 | if(![[self class] isNibBasedTheme]) 38 | return nil; 39 | 40 | return [NSBundle mainBundle]; 41 | } 42 | 43 | +(UIView*)nibView 44 | { 45 | if(![[self class] isNibBasedTheme]) 46 | return nil; 47 | 48 | return [UIView loadInstanceFromNibWithName:[[self class] nibName] owner:self bundle:[[self class] nibBundle]]; 49 | } 50 | 51 | @end 52 | 53 | @implementation HKVideoPlayerThemeView(Assets) 54 | 55 | +(NSString *)specifyDefaultBundle 56 | { 57 | return @"HKVideoPlayer.bundle"; 58 | } 59 | 60 | +(UIImage *)getAssetImageWithName:(NSString *)fileName 61 | { 62 | return [self getAssetImageWithName:fileName bundle:[self specifyDefaultBundle]]; 63 | } 64 | 65 | +(UIImage *)getAssetImageWithName:(NSString *)fileName bundle:(NSString *)bundleName 66 | { 67 | NSString *bundlePath = [[NSBundle mainBundle] pathForResource:[bundleName stringByDeletingPathExtension] ofType:[bundleName pathExtension]]; 68 | 69 | NSString *imagePath = [NSString stringWithFormat:@"%@/Assets/%@.png",bundlePath,fileName]; 70 | UIImage * image = [UIImage imageWithContentsOfFile:imagePath]; 71 | 72 | return image; 73 | } 74 | 75 | +(NSString *)timeStringFromSeconds:(float)secondsValue; 76 | { 77 | NSInteger currentSeconds = ceilf(secondsValue); 78 | NSInteger seconds = currentSeconds % 60; 79 | NSInteger minutes = currentSeconds / 60; 80 | NSInteger hours = minutes / 60; 81 | 82 | NSString * currentTime = [NSString stringWithFormat:@"%02ld:%02ld:%02ld", (long)hours, (long)minutes, (long)seconds]; 83 | return currentTime; 84 | } 85 | 86 | +(UIImage *)imageFromText:(NSString *)text 87 | { 88 | UIFont *font = [UIFont systemFontOfSize:20.0]; 89 | CGSize size = [text sizeWithAttributes: 90 | @{NSFontAttributeName: 91 | [UIFont systemFontOfSize:20.0f]}]; 92 | if (UIGraphicsBeginImageContextWithOptions != NULL) 93 | UIGraphicsBeginImageContextWithOptions(size,NO,0.0); 94 | else 95 | UIGraphicsBeginImageContext(size); 96 | 97 | [text drawAtPoint:CGPointMake(0.0, 0.0) withFont:font]; 98 | // [text drawAtPoint:CGPointMake(0.0, 0.0) forWidth:CGPointMake(0, 0) withFont:font fontSize:nil lineBreakMode:NSLineBreakByWordWrapping baselineAdjustment:NSTextAlignmentCenter]; 99 | 100 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 101 | UIGraphicsEndImageContext(); 102 | 103 | return image; 104 | } 105 | 106 | @end 107 | 108 | @implementation HKVideoPlayerThemeView 109 | 110 | 111 | @synthesize playerVC=_playerVC; 112 | 113 | - (id)initWithFrame:(CGRect)frame 114 | { 115 | self = [super initWithFrame:frame]; 116 | if (self) { 117 | // Initialization code 118 | } 119 | return self; 120 | } 121 | 122 | +(instancetype)theme 123 | { 124 | if([[self class] isNibBasedTheme]) 125 | { 126 | return [[self class] loadInstanceFromNibWithName:[[self class] nibName] owner:self bundle:[[self class] nibBundle]]; 127 | } 128 | 129 | return [self new]; 130 | } 131 | 132 | -(NSString *)playerTitle 133 | { 134 | if(_playerTitle) 135 | return _playerTitle; 136 | else 137 | return @"HKVideoPlayer"; 138 | } 139 | 140 | -(NSString *)playerSubTitle 141 | { 142 | if(_playerSubTitle) 143 | return _playerSubTitle; 144 | else 145 | return @"There's no subtitle now"; 146 | } 147 | 148 | /* 149 | // Only override drawRect: if you perform custom drawing. 150 | // An empty implementation adversely affects performance during animation. 151 | - (void)drawRect:(CGRect)rect 152 | { 153 | // Drawing code 154 | } 155 | */ 156 | 157 | -(void)renderThemeOnPlayerVC:(HKVideoPlayerViewController*)playerVC 158 | { 159 | _playerVC = playerVC; 160 | self.frame = playerVC.view.bounds; 161 | 162 | if([[self class] isNibBasedTheme]) 163 | { 164 | [self renderThemeAssetOnPlayerVC:playerVC]; 165 | [self awakeFromNib]; 166 | } 167 | } 168 | 169 | -(void)renderLoadingOnPlayerVC:(HKVideoPlayerViewController *)playerVC 170 | { 171 | _playerVC = playerVC; 172 | self.frame = playerVC.view.bounds; 173 | 174 | _indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 175 | _indicator.frame = CGRectMake(self.bounds.size.width/2, self.bounds.size.height/2, _indicator.frame.size.width, _indicator.bounds.size.height); 176 | [self addSubview:_indicator]; 177 | _indicator.hidden = YES; 178 | } 179 | 180 | -(void)setEventHandler 181 | { 182 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 183 | } 184 | 185 | 186 | -(void)showThemeView:(BOOL)animated 187 | { 188 | float durationValue = animated ? 1 : 0; 189 | [self setHidden:NO]; 190 | self.alpha = 0; 191 | self.playerVC.view.userInteractionEnabled=NO; 192 | [UIView animateWithDuration:durationValue delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 193 | self.alpha = 1; 194 | } completion:^(BOOL finished) { 195 | self.playerVC.view.userInteractionEnabled=YES; 196 | }]; 197 | } 198 | 199 | -(void)hideThemeView:(BOOL)animated 200 | { 201 | float durationValue = animated ? 1 : 0; 202 | self.alpha = 1; 203 | self.playerVC.view.userInteractionEnabled=NO; 204 | [UIView animateWithDuration:durationValue delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 205 | self.alpha = 0; 206 | } completion:^(BOOL finished) { 207 | [self setHidden:YES]; 208 | self.playerVC.view.userInteractionEnabled=YES; 209 | }]; 210 | } 211 | 212 | -(void)showLoadingAnimation 213 | { 214 | if(!_indicator.hidden) 215 | return; 216 | 217 | _indicator.hidden=NO; 218 | _indicator.alpha=0; 219 | [_indicator startAnimating]; 220 | [UIView animateWithDuration:1 animations:^{ 221 | _indicator.alpha=1; 222 | } completion:^(BOOL finished) { 223 | 224 | }]; 225 | } 226 | 227 | -(void)hideLoadingAnimation 228 | { 229 | if(_indicator.hidden) 230 | return; 231 | 232 | _indicator.hidden=NO; 233 | _indicator.alpha=1; 234 | [UIView animateWithDuration:1 animations:^{ 235 | _indicator.alpha=0; 236 | } completion:^(BOOL finished) { 237 | _indicator.hidden=YES; 238 | [_indicator stopAnimating]; 239 | }]; 240 | } 241 | 242 | #pragma mark - HKVideoPlayerCoreEventDelegate 243 | 244 | -(UIEdgeInsets)playerGetConfigInsets 245 | { 246 | return UIEdgeInsetsMake(0, 0, 0, 0); 247 | } 248 | 249 | #pragma mark - Support interface orientation 250 | 251 | +(BOOL)themeViewShouldAutorotate 252 | { 253 | if(DEVICE_IS_IPAD()) 254 | return NO; 255 | return YES; 256 | } 257 | 258 | +(NSUInteger)themeViewSupportedInterfaceOrientations 259 | { 260 | return UIInterfaceOrientationMaskAllButUpsideDown; 261 | } 262 | 263 | +(BOOL)themeViewShouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 264 | { 265 | // You do not need this method if you are not supporting earlier iOS Versions 266 | // if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) 267 | // return YES; 268 | // if(interfaceOrientation|UIInterfaceOrientationPortraitUpsideDown) 269 | // return YES; 270 | // return NO; 271 | BOOL value = [self themeViewSupportedInterfaceOrientations] | interfaceOrientation; 272 | return value; 273 | } 274 | 275 | #pragma mark - HKVideoPlayerThemeViewRequirementDelegate 276 | 277 | -(BOOL)themeViewAllowResizeWithFrame:(CGRect)frame 278 | { 279 | return YES; 280 | } 281 | 282 | -(BOOL)themeViewAllowDraggableAtPosition:(CGPoint)postion 283 | { 284 | return CGRectContainsPoint(self.frame, postion); 285 | } 286 | 287 | +(BOOL)themeViewRequireStatusBar 288 | { 289 | return UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad; 290 | } 291 | 292 | -(BOOL)themeViewRequireClipsToBounds 293 | { 294 | return self.clipsToBounds; 295 | } 296 | 297 | +(UIColor *)themeViewRequireCoreViewBackgroundColor 298 | { 299 | return [UIColor blackColor]; 300 | } 301 | 302 | +(UIColor *)themeViewRequireViewControllerBackgroundColor 303 | { 304 | return [UIColor blackColor]; 305 | } 306 | 307 | +(BOOL)themeViewShouldSupportIpadnIphone 308 | { 309 | return [self themeViewShouldSupportIpad]&&[self themeViewShouldSupportIphone]; 310 | } 311 | 312 | +(BOOL)themeViewShouldSupportIpad 313 | { 314 | return YES; 315 | } 316 | 317 | +(BOOL)themeViewShouldSupportIphone 318 | { 319 | return YES; 320 | } 321 | 322 | +(CGSize)themeViewPreferedSize 323 | { 324 | return CGSizeZero; 325 | } 326 | 327 | #pragma mark - HKVideoPlayerPreEventDelegate 328 | 329 | -(void)playerWillChangeVolume:(float)volume 330 | { 331 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 332 | } 333 | 334 | -(void)playerWillChangeOrientation:(UIInterfaceOrientation)interfaceOrientation 335 | { 336 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 337 | } 338 | 339 | -(void)playerWillResizeWithFrame:(CGRect)frame 340 | { 341 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 342 | } 343 | 344 | -(void)playerWillCloseView 345 | { 346 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 347 | } 348 | 349 | -(void)playerWillLoad 350 | { 351 | [self showLoadingAnimation]; 352 | } 353 | 354 | -(void)playerWillRewind:(float)speed 355 | { 356 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 357 | } 358 | 359 | -(void)playerWillPlay 360 | { 361 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 362 | } 363 | 364 | -(void)playerWillUpdateTime:(float)position 365 | { 366 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 367 | } 368 | 369 | -(void)playerWillStop 370 | { 371 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 372 | } 373 | 374 | -(void)playerWillPause 375 | { 376 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 377 | } 378 | 379 | -(void)playerWillFastforward:(float)speed 380 | { 381 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 382 | } 383 | 384 | -(void)playerWillExitFullscreen 385 | { 386 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 387 | } 388 | 389 | -(void)playerWillEnterFullscreen 390 | { 391 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 392 | } 393 | 394 | #pragma mark - HKVideoPlayerPostEventDelegate 395 | 396 | -(void)playerDidResizeWithFrame:(CGRect)frame 397 | { 398 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 399 | } 400 | 401 | -(void)playerDidPlay 402 | { 403 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 404 | } 405 | 406 | -(void)playerDidStop 407 | { 408 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 409 | } 410 | 411 | -(void)playerDidPause 412 | { 413 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 414 | } 415 | 416 | -(void)playerDidRenderLoadingAnimation 417 | { 418 | self.hidden = NO; 419 | [self showLoadingAnimation]; 420 | } 421 | 422 | -(void)playerDidRenderView 423 | { 424 | self.hidden = YES; 425 | } 426 | 427 | -(void)playerDidUpdateCurrentTime:(float)currentTime remainTime:(float)remainTime durationTime:(float)durationTime 428 | { 429 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 430 | } 431 | 432 | -(void)playerDidLoad 433 | { 434 | [self hideLoadingAnimation]; 435 | [self showThemeView:YES]; 436 | } 437 | 438 | -(void)playerDidFailure 439 | { 440 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 441 | } 442 | 443 | -(void)playerDidReady 444 | { 445 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 446 | } 447 | 448 | -(void)playerDidExitFullscreen 449 | { 450 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 451 | } 452 | 453 | -(void)playerDidEnterFullscreen 454 | { 455 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 456 | } 457 | 458 | -(void)playerDidCloseView 459 | { 460 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 461 | } 462 | -(void)playerDidChangeVolume:(float)volume 463 | { 464 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 465 | } 466 | 467 | -(void)playerDidUpdateTime:(float)position 468 | { 469 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 470 | } 471 | 472 | -(void)playerDidBeginChangePlayback 473 | { 474 | [self showLoadingAnimation]; 475 | } 476 | 477 | -(void)playerDidEndChangePlayback 478 | { 479 | [self hideLoadingAnimation]; 480 | } 481 | 482 | -(void)playerDidFastforward:(float)speed 483 | { 484 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 485 | } 486 | -(void)playerDidRewind:(float)speed 487 | { 488 | HKPLAYER_THROWS_EXCEPTION_NOT_IMPLEMENTED_YET(); 489 | } 490 | 491 | #pragma mark - Handle touches 492 | // 493 | //-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 494 | //{ 495 | // [self.playerVC touchesBegan:touches withEvent:event]; 496 | //} 497 | // 498 | //-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 499 | //{ 500 | // [self.playerVC touchesEnded:touches withEvent:event]; 501 | //} 502 | // 503 | //-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 504 | //{ 505 | // [self.playerVC touchesMoved:touches withEvent:event]; 506 | //} 507 | // 508 | //-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 509 | //{ 510 | // [self.playerVC touchesCancelled:touches withEvent:event]; 511 | //} 512 | // 513 | //#pragma mark - Handle motions 514 | // 515 | //-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event 516 | //{ 517 | // [self.playerVC motionBegan:motion withEvent:event]; 518 | //} 519 | //-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event 520 | //{ 521 | // [self.playerVC motionEnded:motion withEvent:event]; 522 | //} 523 | //-(void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event 524 | //{ 525 | // [self.playerVC motionCancelled:motion withEvent:event]; 526 | //} 527 | // 528 | //#pragma mark - Handle remote control 529 | // 530 | //-(void)remoteControlReceivedWithEvent:(UIEvent *)event 531 | //{ 532 | // [self.playerVC remoteControlReceivedWithEvent:event]; 533 | //} 534 | 535 | 536 | @end 537 | -------------------------------------------------------------------------------- /Classes/Core/HKVideoPlayerThemeViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerThemeViewDelegate.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol HKVideoPlayerThemeViewDelegate 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Core/UIViewController+Draggable.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Draggable.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/25/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, HKAutoReverseMode) { 12 | HKAutoReverseToOriginalPosition, 13 | HKAutoReverseToBoundaryPosition 14 | }; 15 | 16 | @interface UIViewController (Draggable) 17 | 18 | /**----------------------------------------------------------------------------- 19 | * @name UIView+draggable Properties 20 | * ----------------------------------------------------------------------------- 21 | */ 22 | 23 | /** The pan gestures that handles the view dragging 24 | * 25 | * @param panGesture The tint color of the blurred view. Set to nil to reset. 26 | */ 27 | @property (nonatomic) UIPanGestureRecognizer *panGesture; 28 | 29 | /**----------------------------------------------------------------------------- 30 | * @name UIView+draggable Methods 31 | * ----------------------------------------------------------------------------- 32 | */ 33 | 34 | /** Enables the dragging 35 | * 36 | * Enables the dragging state of the view 37 | */ 38 | 39 | - (void)enableDragging; 40 | 41 | /** Disable or enable the view dragging 42 | * 43 | * @param draggable The boolean that enables or disables the draggable state 44 | */ 45 | - (void)setDraggable:(BOOL)draggable; 46 | - (void)handlePan:(UIPanGestureRecognizer*)sender; 47 | 48 | -(void)enableOutOfBoundary:(BOOL)enable; 49 | -(void)enableAutoReversePostion:(BOOL) enable reserveMode:(HKAutoReverseMode) reverseMode; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/Core/UIViewController+Draggable.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Draggable.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/25/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+Draggable.h" 10 | #import 11 | 12 | 13 | 14 | @implementation UIViewController (Draggable) 15 | 16 | BOOL _enableOutOfBoundary; 17 | BOOL _enableAutoReverse; 18 | HKAutoReverseMode _reverseMode; 19 | 20 | -(void)enableOutOfBoundary:(BOOL)enable 21 | { 22 | _enableOutOfBoundary = enable; 23 | } 24 | 25 | -(void)enableAutoReversePostion:(BOOL)enable reserveMode:(HKAutoReverseMode)reverseMode 26 | { 27 | _enableAutoReverse = enable; 28 | _reverseMode = reverseMode; 29 | } 30 | 31 | - (void)setPanGesture:(UIPanGestureRecognizer*)panGesture 32 | { 33 | objc_setAssociatedObject(self, @selector(panGesture), panGesture, OBJC_ASSOCIATION_RETAIN); 34 | } 35 | 36 | - (UIPanGestureRecognizer*)panGesture 37 | { 38 | return objc_getAssociatedObject(self, @selector(panGesture)); 39 | } 40 | 41 | - (void)handlePan:(UIPanGestureRecognizer*)sender 42 | { 43 | [self adjustAnchorPointForGestureRecognizer:sender]; 44 | CGFloat topMargin = [UIApplication sharedApplication].isStatusBarHidden?0:20.; 45 | CGPoint translation = [sender translationInView:[self.view superview]]; 46 | 47 | CGPoint currentLocation = self.view.center; 48 | CGPoint newLocation = CGPointMake([self.view center].x + translation.x, [self.view center].y + translation.y); 49 | 50 | CGPoint newRightDownBounadaryLocation = CGPointMake(CGRectGetMaxX(self.view.frame)+translation.x, CGRectGetMaxY(self.view.frame)+translation.y); 51 | CGPoint newTopLeftBounadaryLocation = CGPointMake(CGRectGetMinX(self.view.frame)+translation.x, CGRectGetMinY(self.view.frame)+translation.y-topMargin); 52 | 53 | if(CGRectContainsPoint(self.view.superview.frame, newRightDownBounadaryLocation)&&CGRectContainsPoint(self.view.superview.frame, newTopLeftBounadaryLocation)) 54 | { 55 | [self.view setCenter:newLocation]; 56 | } 57 | 58 | [sender setTranslation:(CGPoint){0, 0} inView:[self.view superview]]; 59 | 60 | } 61 | 62 | - (void)adjustAnchorPointForGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 63 | { 64 | if (gestureRecognizer.state == UIGestureRecognizerStateBegan) { 65 | UIView *piece = self.view; 66 | CGPoint locationInView = [gestureRecognizer locationInView:piece]; 67 | CGPoint locationInSuperview = [gestureRecognizer locationInView:piece.superview]; 68 | 69 | piece.layer.anchorPoint = CGPointMake(locationInView.x / piece.bounds.size.width, locationInView.y / piece.bounds.size.height); 70 | piece.center = locationInSuperview; 71 | } 72 | } 73 | 74 | - (void)setDraggable:(BOOL)draggable 75 | { 76 | [self.panGesture setEnabled:draggable]; 77 | } 78 | 79 | - (void)enableDragging 80 | { 81 | self.panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)]; 82 | [self.panGesture setMaximumNumberOfTouches:1]; 83 | [self.panGesture setMinimumNumberOfTouches:1]; 84 | [self.panGesture setCancelsTouchesInView:NO]; 85 | [self.view addGestureRecognizer:self.panGesture]; 86 | } 87 | 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Classes/HKVideoPlayerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerViewController.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HKVideoPlayerFuntionality.h" 11 | #import "HKVideoPlayerEvent.h" 12 | #import "HKVideoPlayerViewControllerDelegate.h" 13 | #import "UIViewController+Draggable.h" 14 | 15 | //https://developer.apple.com/streaming/ 16 | #define URL_BASIC_STREAMING @"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8" 17 | #define URL_ADVANCED_STREAMING @"https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8" 18 | 19 | #define URL_UTUBE_hd720 @"http://r2---sn-42u-nbok.googlevideo.com/videoplayback?fexp=900242,907259,927622,930821,932404,934926,943909,945092,945125,947209,947215,948124,948703,952302,952605,952901,953103,953912,955404,957103,957105,957201&initcwndbps=1243750&key=yt5&upn=1350QzrWR54&sparams=id,initcwndbps,ip,ipbits,itag,mm,ms,mv,ratebypass,source,upn,expire&expire=1416734251&itag=22&ratebypass=yes&ipbits=0&ip=58.186.118.145&mm=31&source=youtube&ms=au&id=o-ACmK1fEhWlxfTPt9MUEqrwx3Qy7nmGrakQD4sc-EpRIR&mv=m&mt=1416712557&sver=3&signature=E106F06173B38F54AEC3FF2095F4BDCC34E68292.4E8CFA7B56D5184B6F1B687A5917D9C68F3A7F25&signature=(null)" 20 | #define URL_UTUBE_MEDIUM @"http://r2---sn-42u-nbok.googlevideo.com/videoplayback?fexp=900242,907259,927622,930821,932404,934926,943909,945092,945125,947209,947215,948124,948703,952302,952605,952901,953103,953912,955404,957103,957105,957201&initcwndbps=1243750&key=yt5&upn=1350QzrWR54&sparams=id,initcwndbps,ip,ipbits,itag,mm,ms,mv,ratebypass,source,upn,expire&expire=1416734251&itag=18&ratebypass=yes&ipbits=0&ip=58.186.118.145&mm=31&source=youtube&ms=au&id=o-ACmK1fEhWlxfTPt9MUEqrwx3Qy7nmGrakQD4sc-EpRIR&mv=m&mt=1416712557&sver=3&signature=13A46F499155AC20FAC19D9A8B466CFE1E07EE12.D8237FB2E46E027034531D88A604641B62252A60&signature=(null)" 21 | #define URL_UTUBE_SMALL @"http://r2---sn-42u-nbok.googlevideo.com/videoplayback?fexp=900242,907259,927622,930821,932404,934926,943909,945092,945125,947209,947215,948124,948703,952302,952605,952901,953103,953912,955404,957103,957105,957201&initcwndbps=1243750&key=yt5&upn=1350QzrWR54&sparams=id,initcwndbps,ip,ipbits,itag,mm,ms,mv,source,upn,expire&expire=1416734251&itag=17&ipbits=0&ip=58.186.118.145&mm=31&source=youtube&ms=au&id=o-ACmK1fEhWlxfTPt9MUEqrwx3Qy7nmGrakQD4sc-EpRIR&mv=m&mt=1416712557&sver=3&signature=6E651303B67AB41A28BC99134A51F232AF125890.48C0EA4F59D2F43E7EE64E7E3A6B7E1A48C8F137&signature=(null)" 22 | 23 | 24 | @class HKVideoPlayerThemeView; 25 | @class HKVideoPlayerCoreView; 26 | 27 | @protocol HKVideoPlayerViewController 28 | 29 | @property(nonatomic,strong)HKVideoPlayerThemeView *themeView; 30 | @property(nonatomic,strong)HKVideoPlayerCoreView *coreView; 31 | @property(nonatomic,weak) id delegate; 32 | 33 | -(void)loadUrl:(NSURL*)url autoPlay:(BOOL)autoPlay; 34 | 35 | @end 36 | 37 | @interface HKVideoPlayerViewController : UIViewController 38 | 39 | @property(nonatomic,strong,readonly) NSURL *videoUrl; 40 | @property(nonatomic,readonly)BOOL isPlaying; 41 | @property(nonatomic,assign) BOOL enableRepeat; 42 | @property(nonatomic,assign,readonly) BOOL enableAutoPlay; 43 | @property(nonatomic,assign,readonly) BOOL enableFullScreen; 44 | @property(nonatomic)float currentSpeed; 45 | @property(nonatomic,assign) CGRect baseFrame; 46 | @property(nonatomic,assign,readonly)BOOL enableSyncMedia; 47 | 48 | -(instancetype)initWithFrame:(CGRect)frame theme:(HKVideoPlayerThemeView*) themeView; 49 | 50 | -(void)setPlayerTitle:(NSString*)string subTitle:(NSString*)subTitle; 51 | 52 | -(void)autoHideThemeView:(BOOL)enable afterTime:(float) second; 53 | 54 | -(void)syncMediaToControlCenter:(BOOL)enable; 55 | 56 | -(void)enableZooming:(BOOL)enable; 57 | 58 | - (BOOL)isModal; 59 | 60 | -(instancetype) goingToAddSubview; 61 | -(instancetype) goingToBePresented; 62 | @end 63 | -------------------------------------------------------------------------------- /Classes/HKVideoPlayerViewControllerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerViewControllerDelegate.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | @class HKVideoPlayerViewController; 11 | 12 | @protocol HKVideoPlayerViewControllerDelegate 13 | 14 | @required 15 | -(void) videoPlayer:(HKVideoPlayerViewController*)videoPlayer didCloseView:(UIView*)view; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_airplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_airplay.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_airplay@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_airplay@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_close.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_close@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_cross.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_cross@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_cross@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_fullscreen.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_fullscreen@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_fullscreen@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_minimize.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_minimize@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_minimize@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_next.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_next@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause2.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause2@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause_big.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause_big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_pause_big@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play2.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play2@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play_big.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play_big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_play_big@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_rewind.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_rewind@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_rewind@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_share.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_share@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_transparentBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_transparentBar.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_transparentBar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_transparentBar@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_in.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_in@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_in@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_out.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_out@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Assets/Image_Button_zoom_out@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/airplay-display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/airplay-display.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/airplay-display@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/airplay-display@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/fullscreen-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/fullscreen-button.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/fullscreen-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/fullscreen-button@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/minimize-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/minimize-button.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/minimize-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/minimize-button@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/pause-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/pause-button.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/pause-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/pause-button@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/play-button.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/play-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/play-button@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/share-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/share-button.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/share-button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/share-button@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/transparentBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/transparentBar.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Others/transparentBar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Others/transparentBar@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Title 9 | Group 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | AutocapitalizationType 15 | None 16 | AutocorrectionType 17 | No 18 | DefaultValue 19 | 20 | IsSecure 21 | 22 | Key 23 | name_preference 24 | KeyboardType 25 | Alphabet 26 | Title 27 | Name 28 | Type 29 | PSTextFieldSpecifier 30 | 31 | 32 | DefaultValue 33 | 34 | Key 35 | enabled_preference 36 | Title 37 | Enabled 38 | Type 39 | PSToggleSwitchSpecifier 40 | 41 | 42 | DefaultValue 43 | 0.5 44 | Key 45 | slider_preference 46 | MaximumValue 47 | 1 48 | MaximumValueImage 49 | 50 | MinimumValue 51 | 0 52 | MinimumValueImage 53 | 54 | Type 55 | PSSliderSpecifier 56 | 57 | 58 | StringsTable 59 | Root 60 | 61 | 62 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_collect.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_collect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_collect@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_open.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_open@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/add_sections_icon_open@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_pressed_top_tab_mode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_pressed_top_tab_mode@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_top_tab_mode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_refresh_top_tab_mode@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_pressed_top_tab_mode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_pressed_top_tab_mode@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_top_tab_mode@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/address_bar_ic_stop_top_tab_mode@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_icon@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_sync_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_sync_icon@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_sync_icon_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bookmark_sync_icon_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_back_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_forward_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_menu_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_menu_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_menu_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_menu_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_stop_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_stop_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_stop_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_stop_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_tab_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_tab_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_tab_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/bottom_bar_tab_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/clear_search_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/clear_search_text.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/clear_search_text@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/clear_search_text@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_close_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_close_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_close_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_close_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_setting_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_setting_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_setting_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gesture&voice_setting_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureleft_btn_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureleft_btn_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureleft_btn_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureleft_btn_selected@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureright_btn_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureright_btn_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureright_btn_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/gestureright_btn_selected@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_addTo_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_chrome_sync@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_chrome_sync@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_chrome_sync_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_chrome_sync_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_cloud_tabs@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_cloud_tabs@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_cloud_tabs_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_cloud_tabs_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_download_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_firefox_sync@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_firefox_sync@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_firefox_sync_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_firefox_sync_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_gesture_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_gesture_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_gesture_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_gesture_selected@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_more_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_privacy_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_setting_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_share_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_sonar_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_sonar_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_sonar_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_sonar_selected@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_viaiblepassword_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_viaiblepassword_03@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_viaiblepassword_04_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/ic_viaiblepassword_04_03@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mention_people@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mention_people@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mention_people_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mention_people_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mic_enable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mic_enable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mic_forbidden@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/mic_forbidden@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_normal@2x 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_normal@2x 2.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_pressed@2x 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_pressed@2x 2.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/pageDrop_persion_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_normal.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_pressed.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/post_icon_upload_photo_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close--disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close--disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close_selected--disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close_selected--disable@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/rightsidebar_tab_close_selected@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend_disabled@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend_disabled@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/share_friend_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/social_share_ic_more_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/social_share_ic_more_normal@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/social_share_ic_more_pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/social_share_ic_more_pressed@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/view_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/view_more.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/view_more@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/view_more@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_icon_setting_notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_icon_setting_notice.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_icon_setting_notice@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_icon_setting_notice@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_one@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_one@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_three@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_three@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_two@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/voice_indicator_two@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_loud@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_loud@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_middle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_middle@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_none@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_none@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_slight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/Themes/Green/volumn_slight@2x.png -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayer.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Classes/Themes/HKVideoPlayer.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerClassicalTheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerClassicalTheme.h 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | 11 | @interface HKVideoPlayerClassicalTheme : HKVideoPlayerThemeView 12 | 13 | @property (strong, nonatomic) IBOutlet UIView *vwTopBar; 14 | @property (strong, nonatomic) IBOutlet UIView *vwBottomBar; 15 | 16 | @property (strong, nonatomic) IBOutlet UIButton *btnDone; 17 | @property (strong, nonatomic) IBOutlet UIButton *btnFullScreen; 18 | @property (strong, nonatomic) IBOutlet UIButton *btnPlay; 19 | @property (strong, nonatomic) IBOutlet UIButton *btnPrevious; 20 | @property (strong, nonatomic) IBOutlet UIButton *btnNext; 21 | 22 | 23 | @property (strong, nonatomic) IBOutlet UISlider *slProgressBar; 24 | @property (strong, nonatomic) IBOutlet UISlider *slVolumeBar; 25 | 26 | 27 | - (IBAction)onTapDoneButton:(UIButton *)sender; 28 | - (IBAction)onTapPlayButton:(id)sender; 29 | 30 | - (IBAction)onTapPreviousButton:(id)sender; 31 | - (IBAction)onTapNextButton:(id)sender; 32 | - (IBAction)onTouchDown:(id)sender; 33 | 34 | - (IBAction)onTouchDragExit:(id)sender; 35 | - (IBAction)onTouchUpOutside:(id)sender; 36 | - (IBAction)onTouchUpInside:(id)sender; 37 | - (IBAction)onTouchEditingDidEnd:(id)sender; 38 | 39 | - (IBAction)onTouchCancel:(id)sender; 40 | - (IBAction)onValueChanged:(id)sender; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerClassicalTheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerClassicalTheme.m 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerClassicalTheme.h" 10 | #import "HKUtility.h" 11 | #import "HKVideoPlayerViewController.h" 12 | 13 | 14 | @interface HKVideoPlayerClassicalTheme () 15 | { 16 | float _remainTime; 17 | float _currentTime; 18 | float _durationTime; 19 | } 20 | @end 21 | 22 | @implementation HKVideoPlayerClassicalTheme 23 | 24 | - (instancetype)init 25 | { 26 | self = [super init]; 27 | if (self) { 28 | _remainTime = 0; 29 | _currentTime = 0; 30 | _durationTime = 0; 31 | } 32 | return self; 33 | } 34 | 35 | - (instancetype)initWithFrame:(CGRect)frame 36 | { 37 | self = [super initWithFrame:frame]; 38 | if (self) { 39 | _remainTime = 0; 40 | _currentTime = 0; 41 | _durationTime = 0; 42 | } 43 | return self; 44 | } 45 | 46 | +(BOOL)isNibBasedTheme 47 | { 48 | return YES; 49 | } 50 | 51 | +(NSString *)nibName 52 | { 53 | if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7")) 54 | { 55 | return @"HKVideoPlayerClassicalTheme_NonSizeClass"; 56 | } 57 | 58 | return [[super class] nibName]; 59 | } 60 | 61 | -(void)renderThemeAssetOnPlayerVC:(HKVideoPlayerViewController *)playerVC 62 | { 63 | [_btnNext setTitle:nil forState:UIControlStateNormal]; 64 | [_btnPrevious setTitle:nil forState:UIControlStateNormal]; 65 | [_btnPlay setTitle:nil forState:UIControlStateNormal]; 66 | 67 | [_btnPrevious setImage:[[self class] getAssetImageWithName:@"Image_Button_rewind"] forState:UIControlStateNormal]; 68 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_play"] forState:UIControlStateNormal]; 69 | [_btnNext setImage:[[self class] getAssetImageWithName:@"Image_Button_next"] forState:UIControlStateNormal]; 70 | } 71 | 72 | 73 | - (IBAction)onTapDoneButton:(UIButton *)sender { 74 | [self.playerVC handleCloseView]; 75 | } 76 | 77 | - (IBAction)onTapPlayButton:(id)sender { 78 | [self.playerVC handlePlay]; 79 | } 80 | 81 | - (IBAction)onTapPauseButton:(id)sender { 82 | [self.playerVC handlePause]; 83 | } 84 | 85 | 86 | -(void)playerDidPlay 87 | { 88 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_pause"] forState:UIControlStateNormal]; 89 | [_btnPlay addTarget:self action:@selector(onTapPauseButton:) forControlEvents:UIControlEventTouchUpInside]; 90 | } 91 | 92 | -(void)playerDidPause 93 | { 94 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_play"] forState:UIControlStateNormal]; 95 | [_btnPlay addTarget:self action:@selector(onTapPlayButton:) forControlEvents:UIControlEventTouchUpInside]; 96 | } 97 | 98 | - (IBAction)onTapPreviousButton:(id)sender { 99 | [self.playerVC handleRewind:1]; 100 | } 101 | 102 | - (IBAction)onTapNextButton:(id)sender { 103 | [self.playerVC handleFastforward:1]; 104 | } 105 | 106 | - (IBAction)onTouchDown:(id)sender { 107 | if(sender==_slProgressBar) 108 | { 109 | [self.playerVC playbackBeginScrub]; 110 | } 111 | } 112 | 113 | - (IBAction)onTouchDragExit:(id)sender { 114 | if(sender==_slProgressBar) 115 | { 116 | [self.playerVC playbackEndScrub]; 117 | } 118 | } 119 | 120 | - (IBAction)onTouchUpOutside:(id)sender { 121 | if(sender==_slProgressBar) 122 | { 123 | [self.playerVC playbackEndScrub]; 124 | } 125 | } 126 | 127 | - (IBAction)onTouchUpInside:(id)sender { 128 | if(sender==_slProgressBar) 129 | { 130 | [self.playerVC playbackEndScrub]; 131 | } 132 | } 133 | 134 | - (IBAction)onTouchEditingDidEnd:(id)sender { 135 | if(sender==_slProgressBar) 136 | { 137 | [self.playerVC playbackEndScrub]; 138 | } 139 | } 140 | 141 | - (IBAction)onTouchCancel:(id)sender { 142 | if(sender==_slProgressBar) 143 | { 144 | [self.playerVC playbackEndScrub]; 145 | } 146 | } 147 | 148 | - (IBAction)onValueChanged:(id)sender { 149 | if(sender==_slProgressBar) 150 | { 151 | float seekTIme = _slProgressBar.value * _durationTime; 152 | [self.playerVC playbackScrub:seekTIme]; 153 | } 154 | else if(sender == _slVolumeBar) 155 | { 156 | [self.playerVC volumeScrub:_slVolumeBar.value]; 157 | } 158 | } 159 | 160 | -(void)playerDidChangeVolume:(float)volume 161 | { 162 | _slVolumeBar.value = volume; 163 | } 164 | 165 | -(void)playerWillChangeOrientation:(UIInterfaceOrientation)interfaceOrientation 166 | { 167 | if(DEVICE_IS_IPAD()||UIDeviceOrientationIsLandscape([HKUtility currentOrientation])) 168 | { 169 | [_slProgressBar setMaximumValueImage:[[self class] imageFromText:[[self class] timeStringFromSeconds:_durationTime]]]; 170 | } 171 | else 172 | { 173 | [_slProgressBar setMaximumValueImage:nil]; 174 | } 175 | } 176 | 177 | -(void)playerDidUpdateCurrentTime:(float)currentTime remainTime:(float)remainTime durationTime:(float)durationTime 178 | { 179 | _slProgressBar.enabled = true; 180 | 181 | if(durationTime>=0) 182 | { 183 | _durationTime = durationTime; 184 | if(DEVICE_IS_IPAD()||UIDeviceOrientationIsLandscape([HKUtility currentOrientation])) 185 | { 186 | [_slProgressBar setMaximumValueImage:[[self class] imageFromText:[[self class] timeStringFromSeconds:durationTime]]]; 187 | } 188 | else 189 | { 190 | [_slProgressBar setMaximumValueImage:nil]; 191 | } 192 | } 193 | else 194 | { 195 | _slProgressBar.enabled = false; 196 | return; 197 | } 198 | if(currentTime>=0) 199 | { 200 | _currentTime = currentTime; 201 | [_slProgressBar setMinimumValueImage:[[self class] imageFromText:[[self class] timeStringFromSeconds:currentTime]]]; 202 | } 203 | else 204 | { 205 | _slProgressBar.enabled = false; 206 | return; 207 | } 208 | _remainTime = remainTime; 209 | [_slProgressBar setValue:(currentTime/durationTime) animated:YES]; 210 | } 211 | 212 | @end 213 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerClassicalTheme.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 105 | 134 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerClassicalTheme_NonSizeClass.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 94 | 115 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerDefaultTheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerDefaultTheme.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | 11 | @interface HKVideoPlayerDefaultTheme : HKVideoPlayerThemeView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerDefaultTheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerDefaultTheme.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerDefaultTheme.h" 10 | #import "HKVideoPlayerViewController.h" 11 | #import "HKVideoPlayerCoreView.h" 12 | #import "HKUtility.h" 13 | 14 | 15 | @interface HKVideoPlayerDefaultTheme () 16 | { 17 | float _remainTime; 18 | float _currentTime; 19 | float _durationTime; 20 | } 21 | 22 | 23 | @property UILabel *title; 24 | @property UIView *topBar; 25 | @property UIView *bottomBar; 26 | @property UISlider *progressBar; 27 | @property UIButton *btnPlay; 28 | @property UIButton *btnClose; 29 | @property UIButton *btnRewind; 30 | @property UIButton *btnForward; 31 | 32 | @end 33 | 34 | @implementation HKVideoPlayerDefaultTheme 35 | 36 | - (id)initWithFrame:(CGRect)frame 37 | { 38 | self = [super initWithFrame:frame]; 39 | if (self) { 40 | // Initialization code 41 | _remainTime = 0; 42 | _currentTime = 0; 43 | _durationTime = 0; 44 | } 45 | return self; 46 | } 47 | 48 | - (instancetype)init 49 | { 50 | self = [super init]; 51 | if (self) { 52 | _remainTime = 0; 53 | _currentTime = 0; 54 | _durationTime = 0; 55 | } 56 | return self; 57 | } 58 | 59 | /* 60 | // Only override drawRect: if you perform custom drawing. 61 | // An empty implementation adversely affects performance during animation. 62 | - (void)drawRect:(CGRect)rect 63 | { 64 | // Drawing code 65 | } 66 | */ 67 | 68 | UIView *topBar; 69 | UIView *bottomBar; 70 | -(void)renderThemeOnPlayerVC:(HKVideoPlayerViewController *)playerVC 71 | { 72 | [super renderThemeOnPlayerVC:playerVC]; 73 | 74 | float _topOffset = 20; 75 | float _topBarHeight = 40; 76 | if(DEVICE_IS_IPAD()&&[[self class] themeViewShouldSupportIpad]) 77 | { 78 | _topOffset = 00; 79 | _topBarHeight = 50; 80 | } 81 | 82 | _topBar = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, _topBarHeight + _topOffset)]; 83 | _topBar.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6]; 84 | [self addSubview:_topBar]; 85 | 86 | _btnClose = [UIButton buttonWithType:UIButtonTypeCustom]; 87 | _btnClose.frame = CGRectMake(self.bounds.size.width - _topBarHeight, _topOffset, _topBarHeight, _topBarHeight); 88 | [_btnClose setImage:[[self class] getAssetImageWithName:@"Image_Button_cross"] forState:UIControlStateNormal]; 89 | [_btnClose addTarget:self.playerVC action:@selector(handleCloseView) forControlEvents:UIControlEventTouchUpInside]; 90 | [_topBar addSubview:_btnClose]; 91 | 92 | _bottomBar = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 50, self.bounds.size.width, 50)]; 93 | _bottomBar.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6]; 94 | [self addSubview:_bottomBar]; 95 | 96 | 97 | 98 | _btnRewind = [UIButton buttonWithType:UIButtonTypeCustom]; 99 | _btnRewind.frame = CGRectMake(0, 0, 50, 50); 100 | [_btnRewind setImage:[[self class] getAssetImageWithName:@"Image_Button_rewind"] forState:UIControlStateNormal]; 101 | [_btnRewind addTarget:self.playerVC action:@selector(handleRewind:) forControlEvents:UIControlEventTouchUpInside]; 102 | [_bottomBar addSubview:_btnRewind]; 103 | 104 | _btnPlay = [UIButton buttonWithType:UIButtonTypeCustom]; 105 | _btnPlay.frame = CGRectMake(_btnRewind.frame.origin.x+_btnRewind.frame.size.width, 0, 50, 50); 106 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_play"] forState:UIControlStateNormal]; 107 | [_btnPlay addTarget:self.playerVC action:@selector(handlePlay) forControlEvents:UIControlEventTouchUpInside]; 108 | [_bottomBar addSubview:_btnPlay]; 109 | 110 | _btnForward = [UIButton buttonWithType:UIButtonTypeCustom]; 111 | _btnForward.frame = CGRectMake(_btnPlay.frame.origin.x+_btnPlay.frame.size.width, 0, 50, 50); 112 | [_btnForward setImage:[[self class] getAssetImageWithName:@"Image_Button_next"] forState:UIControlStateNormal]; 113 | [_btnForward addTarget:self.playerVC action:@selector(handleFastforward:) forControlEvents:UIControlEventTouchUpInside]; 114 | [_bottomBar addSubview:_btnForward]; 115 | 116 | _progressBar = [[UISlider alloc] initWithFrame:CGRectMake(_btnForward.frame.origin.x+_btnForward.frame.size.width, 0, self.bounds.size.width-150, 50)]; 117 | [_progressBar addTarget:self.playerVC action:@selector(playbackBeginScrub) forControlEvents:UIControlEventTouchDown]; 118 | [_progressBar addTarget:self action:@selector(onProgressChange:) forControlEvents:UIControlEventValueChanged]; 119 | [_progressBar addTarget:self.playerVC action:@selector(playbackEndScrub) forControlEvents:UIControlEventTouchUpInside]; 120 | [_progressBar addTarget:self.playerVC action:@selector(playbackEndScrub) forControlEvents:UIControlEventTouchUpOutside]; 121 | [_progressBar addTarget:self.playerVC action:@selector(playbackEndScrub) forControlEvents:UIControlEventTouchCancel]; 122 | [_progressBar addTarget:self.playerVC action:@selector(playbackEndScrub) forControlEvents:UIControlEventTouchDragExit]; 123 | [_progressBar addTarget:self.playerVC action:@selector(playbackEndScrub) forControlEvents:UIControlEventEditingDidEnd]; _progressBar.enabled = false; 124 | [_bottomBar addSubview:_progressBar]; 125 | 126 | 127 | 128 | } 129 | 130 | -(void)showThemeView:(BOOL)animated 131 | { 132 | self.hidden = NO; 133 | _topBar.transform = CGAffineTransformTranslate(_topBar.transform, 0, -_topBar.bounds.size.height); 134 | _topBar.alpha=0; 135 | _bottomBar.transform = CGAffineTransformTranslate(_bottomBar.transform, 0, _bottomBar.bounds.size.height); 136 | _bottomBar.alpha=0; 137 | 138 | [UIView animateWithDuration:animated?1:0 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 139 | 140 | _topBar.alpha=1; 141 | _topBar.transform = CGAffineTransformIdentity; 142 | _bottomBar.alpha=1; 143 | _bottomBar.transform = CGAffineTransformIdentity; 144 | 145 | } completion:^(BOOL finished) { 146 | 147 | }]; 148 | } 149 | 150 | -(void)hideThemeView:(BOOL)animated 151 | { 152 | 153 | _topBar.alpha=1; 154 | 155 | _bottomBar.alpha=1; 156 | _topBar.transform = CGAffineTransformIdentity; 157 | _bottomBar.transform = CGAffineTransformIdentity; 158 | [UIView animateWithDuration:animated?1:0 animations:^{ 159 | _topBar.alpha=0; 160 | _topBar.transform = CGAffineTransformTranslate(_topBar.transform, 0, -_topBar.bounds.size.height); 161 | _bottomBar.alpha=0; 162 | _bottomBar.transform = CGAffineTransformTranslate(_bottomBar.transform, 0, _bottomBar.bounds.size.height); 163 | } completion:^(BOOL finished) { 164 | self.hidden = YES; 165 | }]; 166 | } 167 | 168 | -(void)onProgressChange:(id)sender 169 | { 170 | float seekTIme = _progressBar.value * _durationTime; 171 | [self.playerVC playbackScrub:seekTIme]; 172 | } 173 | 174 | -(void)playerDidUpdateCurrentTime:(float)currentTime remainTime:(float)remainTime durationTime:(float)durationTime 175 | { 176 | _progressBar.enabled = true; 177 | 178 | if(durationTime>=0) 179 | { 180 | _durationTime = durationTime; 181 | if(DEVICE_IS_IPAD()) 182 | [_progressBar setMaximumValueImage:[[self class] imageFromText:[[self class] timeStringFromSeconds:durationTime]]]; 183 | } 184 | else 185 | { 186 | _progressBar.enabled = false; 187 | return; 188 | } 189 | if(currentTime>=0) 190 | { 191 | _currentTime = currentTime; 192 | [_progressBar setMinimumValueImage:[[self class] imageFromText:[[self class] timeStringFromSeconds:currentTime]]]; 193 | } 194 | else 195 | { 196 | _progressBar.enabled = false; 197 | return; 198 | } 199 | _remainTime = remainTime; 200 | [_progressBar setValue:(currentTime/durationTime) animated:YES]; 201 | } 202 | 203 | -(BOOL)themeViewAllowDraggableAtPosition:(CGPoint)postion 204 | { 205 | BOOL draggable = [super themeViewAllowDraggableAtPosition:postion]; 206 | 207 | draggable = draggable && !_topBar.hidden && CGRectContainsPoint(_topBar.frame, postion); 208 | 209 | draggable = draggable && !CGRectContainsPoint(_bottomBar.frame, postion); 210 | 211 | return draggable; 212 | } 213 | 214 | -(void)playerDidPlay 215 | { 216 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_pause"] forState:UIControlStateNormal]; 217 | [_btnPlay addTarget:self.playerVC action:@selector(handlePause) forControlEvents:UIControlEventTouchUpInside]; 218 | } 219 | 220 | -(void)playerDidPause 221 | { 222 | [_btnPlay setImage:[[self class] getAssetImageWithName:@"Image_Button_play"] forState:UIControlStateNormal]; 223 | [_btnPlay addTarget:self.playerVC action:@selector(handlePlay) forControlEvents:UIControlEventTouchUpInside]; 224 | } 225 | 226 | -(void)playerDidCloseView 227 | { 228 | [self hideThemeView:YES]; 229 | } 230 | 231 | -(UIEdgeInsets)playerGetConfigInsets 232 | { 233 | // return UIEdgeInsetsMake(50, 0, 50, 0); 234 | return UIEdgeInsetsZero; 235 | } 236 | 237 | -(BOOL)themeViewRequireClipsToBounds 238 | { 239 | return YES; 240 | } 241 | 242 | +(BOOL)themeViewRequireStatusBar 243 | { 244 | return YES; 245 | } 246 | 247 | -(void)setEventHandler 248 | { 249 | 250 | } 251 | 252 | +(BOOL)themeViewShouldAutorotate 253 | { 254 | return NO; 255 | } 256 | 257 | +(BOOL)themeViewShouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 258 | { 259 | return (interfaceOrientation == [[self class] themeViewSupportedInterfaceOrientations]); 260 | 261 | } 262 | 263 | +(NSUInteger)themeViewSupportedInterfaceOrientations 264 | { 265 | return UIInterfaceOrientationPortrait; 266 | } 267 | 268 | @end 269 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerGreenTheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerGreenTheme.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/28/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | 11 | @interface HKVideoPlayerGreenTheme : HKVideoPlayerThemeView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerGreenTheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerGreenTheme.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/28/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerGreenTheme.h" 10 | 11 | @implementation HKVideoPlayerGreenTheme 12 | 13 | - (id)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code 18 | } 19 | return self; 20 | } 21 | 22 | /* 23 | // Only override drawRect: if you perform custom drawing. 24 | // An empty implementation adversely affects performance during animation. 25 | - (void)drawRect:(CGRect)rect 26 | { 27 | // Drawing code 28 | } 29 | */ 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerWinterTheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerWinterTheme.h 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | 11 | @interface HKVideoPlayerWinterTheme : HKVideoPlayerThemeView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerWinterTheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerWinterTheme.m 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerWinterTheme.h" 10 | 11 | @implementation HKVideoPlayerWinterTheme 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerWoodenTheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerWoodenTheme.h 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerThemeView.h" 10 | 11 | @interface HKVideoPlayerWoodenTheme : HKVideoPlayerThemeView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Themes/HKVideoPlayerWoodenTheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKVideoPlayerWoodenTheme.m 3 | // iOS Video Player 4 | // 5 | // Created by HK on 11/27/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKVideoPlayerWoodenTheme.h" 10 | 11 | @implementation HKVideoPlayerWoodenTheme 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Images/Feature_Integrate_To_Control_Center.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Images/Feature_Integrate_To_Control_Center.PNG -------------------------------------------------------------------------------- /Images/Theme_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikieu/iOS-Video-Player/667113a1040e0bc7e2b366474ffb4ee29e4044b3/Images/Theme_default.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright ç Nov 2014 by haikieu2907@gmail.com 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HKVideoPlayer (Obsoleted, this is no longer maintained) 2 | ================ 3 | 4 | iOS Ultimate video player with customizable theme view, compatible to ipad as well as iphone with very cool UI themes 5 | 6 | Make donation for Hai Kieu's github 7 | 8 | ####Features Summary 9 | 10 | #####1) Strong Player ViewController available 11 | + Easy to use and integrate with delegate [√] 12 | + Support ipad and iphone as well [√] 13 | + Support orientation roration [√] 14 | + Clearly core event and delegate flow. [√] 15 | 16 | #####2) Customize theme view easily 17 | + Able to create new theme easily without modifing core player & view controller. [√] 18 | + Able to specify theme requirements to override overall view for final united view. [√] 19 | + Rich themes available (default theme, green theme, classical theme,etc..) [On-going] 20 | 21 | #####3) Gesture supporting 22 | + Double tap to zoom player layer [√] 23 | + Pan to drag [√] 24 | + Tap to show up theme [√] 25 | + Pinch to resize [TODO] 26 | 27 | #####4) Core playing functionalities 28 | + Play, pause, stop, rewind, forward [√] 29 | + Seek playback, progressbar updating [√] 30 | + Clearly core event and delegate flow. [√] 31 | + Support HLS protocol [√] 32 | + Support rtmp, rtsp protocol [TODO] 33 | + Volume, mute, speaker balance [TODO] 34 | + Dodby sound [TODO] 35 | 36 | #####5)Integrate player to Control Center 37 | + Display & sync player title & info [√] 38 | + Play, pause, rewind, forward [√] 39 | + Display & sync playback progress [√] 40 | + Seek playback [TODO] 41 | 42 | #####6) Extra functions 43 | + Record movie [TODO] 44 | + Record audio [TODO] 45 | + Take a screenshot of movie [TODO] 46 | 47 | 48 | ![HKVideoPlayer](https://raw.githubusercontent.com/haikieu/iOS-Video-Player/master/Images/Theme_default.png "Video player with default theme") 49 | 50 | ![HKVideoPlayer](https://raw.githubusercontent.com/haikieu/iOS-Video-Player/master/Images/Feature_Integrate_To_Control_Center.PNG "Integrate video player to iOS control center") 51 | 52 | 53 | ------------------------------------------------- 54 | Copyright November,2014 by haikieu2907@gmail.com 55 | Apache License Version 2.0, January 2004 56 | http://www.apache.org/licenses/ 57 | 58 | Make donation for Hai Kieu's github 59 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player.xcodeproj/xcuserdata/welcome.xcuserdatad/xcschemes/iOS Video Player.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player.xcodeproj/xcuserdata/welcome.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | iOS Video Player.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 42EBF2AE1A205E93006AF19C 16 | 17 | primary 18 | 19 | 20 | 42EBF2D21A205E93006AF19C 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/Base.lproj/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/Base.lproj/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/HKAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKAppDelegate.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HKAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/HKAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKAppDelegate.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKAppDelegate.h" 10 | 11 | @implementation HKAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/HKViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKViewController.h 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "HKVideoPlayerViewControllerDelegate.h" 12 | 13 | @interface HKViewController : UIViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/HKViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKViewController.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "HKViewController.h" 10 | #import "HKVideoPlayerViewController.h" 11 | #import "HKVideoPlayerDefaultTheme.h" 12 | #import "HKVideoPlayerClassicalTheme.h" 13 | #import "HKUtility.h" 14 | #import "HKVideoPlayerCoreView.h" 15 | #import "HKVideoPlayerViewControllerDelegate.h" 16 | 17 | 18 | @interface HKViewController () 19 | 20 | @property HKVideoPlayerViewController *playerVC; 21 | 22 | @property (nonatomic,strong) UITableView * tableView; 23 | 24 | @end 25 | 26 | @implementation HKViewController 27 | 28 | - (void)viewDidLoad 29 | { 30 | [super viewDidLoad]; 31 | // Do any additional setup after loading the view, typically from a nib. 32 | 33 | } 34 | -(void)viewDidAppear:(BOOL)animated 35 | { 36 | [super viewDidAppear:animated]; 37 | 38 | _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; 39 | _tableView.delegate = self; 40 | _tableView.dataSource = self; 41 | [_tableView setContentInset:UIEdgeInsetsMake(20, 0, 0, 0)]; 42 | 43 | [self.view addSubview:_tableView]; 44 | 45 | 46 | } 47 | 48 | #pragma mark - UITableView datasource 49 | 50 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 51 | { 52 | return 1; 53 | } 54 | 55 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 56 | { 57 | return 2; 58 | } 59 | 60 | #pragma mark - UITableView delegate 61 | 62 | 63 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 64 | { 65 | static NSString * reuseIdentifier = @"reuse_menu_item"; 66 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; 67 | 68 | if(!cell) 69 | { 70 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier]; 71 | } 72 | 73 | NSString * className = nil; 74 | NSString * title = nil; 75 | switch (indexPath.row) { 76 | case 0: 77 | className = @"HKVideoPlayerDefaultTheme"; 78 | title = @"Default theme"; 79 | break; 80 | 81 | case 1: 82 | 83 | className = @"HKVideoPlayerClassicalTheme"; 84 | title = @"Classical theme"; 85 | break; 86 | } 87 | 88 | cell.detailTextLabel.text = className; 89 | cell.textLabel.text = title; 90 | 91 | return cell; 92 | } 93 | 94 | static UIView * backgroundTheme; 95 | 96 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 97 | { 98 | UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath]; 99 | 100 | Class themeClass = NSClassFromString(cell.detailTextLabel.text); 101 | 102 | _playerVC = [[[HKVideoPlayerViewController alloc] initWithFrame:CGRectMake(60, 60, 600, 400) theme:[themeClass theme]] goingToAddSubview]; 103 | [_playerVC enableDragging]; 104 | [_playerVC autoHideThemeView:YES afterTime:3]; 105 | _playerVC.delegate = self; 106 | 107 | if(DEVICE_IS_IPHONE()) 108 | { 109 | [self presentViewController:_playerVC animated:YES completion:^{ 110 | [_playerVC syncMediaToControlCenter:YES]; 111 | }]; 112 | 113 | } 114 | else 115 | { 116 | static dispatch_once_t onceToken; 117 | dispatch_once(&onceToken, ^{ 118 | 119 | backgroundTheme = [[UIView alloc] initWithFrame:self.view.bounds]; 120 | backgroundTheme.backgroundColor = [UIColor blackColor]; 121 | backgroundTheme.alpha = 1; 122 | }); 123 | 124 | [self.view addSubview:backgroundTheme]; 125 | [self.view addSubview:_playerVC.view]; 126 | 127 | _playerVC.view.alpha = 0; 128 | backgroundTheme.alpha = 0; 129 | [UIView animateWithDuration:1 animations:^{ 130 | 131 | _playerVC.view.alpha = 1; 132 | backgroundTheme.alpha = 0.5; 133 | } completion:^(BOOL finished) { 134 | 135 | [_playerVC syncMediaToControlCenter:YES]; 136 | }]; 137 | } 138 | 139 | [_playerVC loadUrl:[NSURL URLWithString:URL_ADVANCED_STREAMING] autoPlay:YES]; 140 | } 141 | 142 | 143 | -(void)videoPlayer:(HKVideoPlayerViewController *)videoPlayer didCloseView:(UIView *)view 144 | { 145 | if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone) 146 | { 147 | [videoPlayer dismissViewControllerAnimated:YES completion:^{ 148 | //TODO 149 | }]; 150 | } 151 | else 152 | { 153 | [UIView animateWithDuration:1 animations:^{ 154 | backgroundTheme.alpha = 0; 155 | view.alpha = 0; 156 | } completion:^(BOOL finished) { 157 | 158 | [backgroundTheme removeFromSuperview]; 159 | 160 | [videoPlayer.themeView removeFromSuperview]; 161 | [videoPlayer.coreView removeFromSuperview]; 162 | [view removeFromSuperview]; 163 | }]; 164 | 165 | } 166 | } 167 | 168 | #pragma mark - Enhance orientation 169 | 170 | -(BOOL)shouldAutorotate 171 | { 172 | return NO; 173 | 174 | } 175 | 176 | -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 177 | { 178 | return NO; 179 | } 180 | 181 | 182 | -(void)viewWillAppear:(BOOL)animated 183 | { 184 | [super viewWillAppear:animated]; 185 | } 186 | 187 | 188 | - (void)didReceiveMemoryWarning 189 | { 190 | [super didReceiveMemoryWarning]; 191 | // Dispose of any resources that can be recreated. 192 | } 193 | 194 | 195 | @end 196 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/iOS Video Player-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.hk.lib.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/iOS Video Player-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #import 17 | #import 18 | #endif 19 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video Player/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iOS Video Player 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "HKAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([HKAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video PlayerTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video PlayerTests/iOS Video PlayerTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.hk.lib.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /iOS Video Player/iOS Video PlayerTests/iOS_Video_PlayerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // iOS_Video_PlayerTests.m 3 | // iOS Video PlayerTests 4 | // 5 | // Created by Hai Kieu on 11/22/14. 6 | // Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface iOS_Video_PlayerTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation iOS_Video_PlayerTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | --------------------------------------------------------------------------------