Initial commit

このコミットが含まれているのは:
Jamie Berghmans
2019-12-28 23:59:06 +01:00
コミット 8d9472a3a6
5個のファイルの変更101行の追加0行の削除

3
.gitignore vendored ノーマルファイル
ファイルの表示

@ -0,0 +1,3 @@
.DS_Store
.theos
packages

1
AutoReplay.plist ノーマルファイル
ファイルの表示

@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.mobileslideshow" ); }; }

11
Makefile ノーマルファイル
ファイルの表示

@ -0,0 +1,11 @@
export ARCHS = armv7 arm64 arm64e
include ~/theos/makefiles/common.mk
TWEAK_NAME = AutoReplay
AutoReplay_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"

77
Tweak.xm ノーマルファイル
ファイルの表示

@ -0,0 +1,77 @@
typedef struct {
long long value;
int timescale;
unsigned int flags;
long long epoch;
} TIME;
@interface PUBrowsingVideoPlayer
-(void)videoSessionDidPlayToEnd:(id)arg1; //IOS12
-(void)avPlayer:(id)arg1 itemDidPlayToEnd:(id)arg2; //IOS13
-(void)seekToTime:(TIME)arg1 toleranceBefore:(TIME)arg2 toleranceAfter:(TIME)arg3 completionHandler:(id)arg4;
-(void)seekToTime:(TIME)arg1 completionHandler:(id)arg2;
-(TIME)currentTime;
-(void)_updateVideoSessionDesiredPlayState;
-(void)rewindExistingPlayer;
@property(nonatomic) long long desiredPlayState;
@end
%group IOS12
%hook PUBrowsingVideoPlayer
- (void)avPlayer:(id)arg1 itemDidPlayToEnd:(id)arg2 {
// %orig (arg1, arg2);
NSLog(@"AutoReplay - Ended 12");
TIME t = [self currentTime];
t.value = (long long) 0;
t.timescale = 100;
t.flags = (unsigned int) 1;
[self seekToTime:t toleranceBefore:t toleranceAfter:t completionHandler:NULL];
}
%end
%end //end group IOS12
%group IOS13
%hook PUBrowsingVideoPlayer
static bool isFirstTryAfterEnding = false;
- (void)videoSessionDidPlayToEnd:(id)arg1 {
isFirstTryAfterEnding = true;
[self rewindExistingPlayer];
}
- (void)_updateVideoSessionDesiredPlayState {
if (self.desiredPlayState == 0 && isFirstTryAfterEnding) {
isFirstTryAfterEnding = false;
MSHookIvar<long long>(self, "_desiredPlayState") = 1;
}
%orig;
}
%end
%end //end group IOS13
%ctor {
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version <= 12) {
%init(IOS12);
} else {
%init(IOS13);
}
}

9
control ノーマルファイル
ファイルの表示

@ -0,0 +1,9 @@
Package: com.devvix.autoreplay
Name: AutoReplay
Depends: mobilesubstrate
Version: 1.0.2
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: Devvix
Author: Devvix
Section: Tweaks