|
|
|
|
|
|
|
|
|
|
|
|
|
|
@end |
|
|
@end |
|
|
|
|
|
|
|
|
@interface AVPlaybackControlsView |
|
|
|
|
|
@property (assign, nonatomic) AVTransportControlsView *transportControlsView; |
|
|
|
|
|
@end |
|
|
|
|
|
|
|
|
|
|
|
@interface AVPlayerViewControllerContentView |
|
|
|
|
|
@property (assign, nonatomic) AVPlaybackControlsView *playbackControlsView; |
|
|
|
|
|
@end |
|
|
|
|
|
|
|
|
|
|
|
@interface AVFullScreenViewController |
|
|
|
|
|
@property (assign, nonatomic) AVPlayerViewControllerContentView *contentView; |
|
|
|
|
|
@end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void); |
|
|
extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
%hook AVFullScreenViewController |
|
|
|
|
|
int test = 30; |
|
|
|
|
|
-(void)viewDidLayoutSubviews{ |
|
|
|
|
|
%orig; |
|
|
|
|
|
if(test > 1){ |
|
|
|
|
|
[self.contentView.playbackControlsView.transportControlsView deviceOrientationDidChange]; |
|
|
|
|
|
test--;; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
-(void)viewDidDisappear:(bool)arg1{ |
|
|
|
|
|
%orig; |
|
|
|
|
|
test = 10; |
|
|
|
|
|
} |
|
|
|
|
|
%end |
|
|
|
|
|
|
|
|
|
|
|
%hook SBOrientationLockManager |
|
|
%hook SBOrientationLockManager |
|
|
-(SBOrientationLockManager*)init{ |
|
|
-(SBOrientationLockManager*)init{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%hook AVTransportControlsView |
|
|
%hook AVTransportControlsView |
|
|
|
|
|
int test = 30; |
|
|
-(AVTransportControlsView *)initWithFrame:(CGRect)frame{ |
|
|
-(AVTransportControlsView *)initWithFrame:(CGRect)frame{ |
|
|
AVTransportControlsView *origself = %orig(frame); |
|
|
AVTransportControlsView *origself = %orig(frame); |
|
|
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), |
|
|
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), |
|
|
|
|
|
|
|
|
-(void)dealloc{ |
|
|
-(void)dealloc{ |
|
|
%orig; |
|
|
%orig; |
|
|
CFNotificationCenterRemoveObserver ( CFNotificationCenterGetDarwinNotifyCenter(), (void*)myObserver, NULL, NULL); |
|
|
CFNotificationCenterRemoveObserver ( CFNotificationCenterGetDarwinNotifyCenter(), (void*)myObserver, NULL, NULL); |
|
|
|
|
|
test = 30; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(void)layoutSubviews{ |
|
|
|
|
|
%orig; |
|
|
|
|
|
if(test > 1){ |
|
|
|
|
|
[self deviceOrientationDidChange]; |
|
|
|
|
|
test--;; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
%new |
|
|
%new |
|
|
-(void)deviceOrientationDidChange{ |
|
|
-(void)deviceOrientationDidChange{ |