mirror of
https://github.com/gilshahar7/AVLock.git
synced 2025-06-28 08:46:47 +00:00
Version 1.0.1
Fixed tweak not working inside the Apollo Reddit app (simplified to using only AVTransportControlsView instead of AVFullScreenViewController to increase compatability in modified video players).
This commit is contained in:
39
Tweak.xm
39
Tweak.xm
@ -21,19 +21,6 @@
|
|||||||
|
|
||||||
@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);
|
||||||
@ -71,22 +58,6 @@ static void firstUpdate(CFNotificationCenterRef center, void *observer, CFString
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%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{
|
||||||
@ -130,6 +101,7 @@ CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
|
|||||||
|
|
||||||
|
|
||||||
%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(),
|
||||||
@ -163,9 +135,16 @@ 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{
|
||||||
|
BIN
com.gilshahar7.avlock_1.0.1_iphoneos-arm.deb
Normal file
BIN
com.gilshahar7.avlock_1.0.1_iphoneos-arm.deb
Normal file
Binary file not shown.
2
control
2
control
@ -1,7 +1,7 @@
|
|||||||
Package: com.gilshahar7.avlock
|
Package: com.gilshahar7.avlock
|
||||||
Name: AVLock
|
Name: AVLock
|
||||||
Depends: mobilesubstrate
|
Depends: mobilesubstrate
|
||||||
Version: 1.0
|
Version: 1.0.1
|
||||||
Architecture: iphoneos-arm
|
Architecture: iphoneos-arm
|
||||||
Description: Add an orientation lock button to the iOS 11 stock video player
|
Description: Add an orientation lock button to the iOS 11 stock video player
|
||||||
Maintainer: gilshahar7
|
Maintainer: gilshahar7
|
||||||
|
Reference in New Issue
Block a user