mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 12:30:12 +02:00
fix: bypass video length restriction
This commit is contained in:
parent
1a9d55b217
commit
3cd628f7cf
@ -63,9 +63,11 @@ class BypassVideoLengthRestriction :
|
||||
}
|
||||
|
||||
// chat camera roll grid
|
||||
findClass("com.snap.impala.common.media.MediaLibraryItem").hookConstructor(HookStage.BEFORE) { param ->
|
||||
//set the video length argument
|
||||
param.setArg(3, -1L)
|
||||
findClass("com.snap.composer.memories.MemoriesPickerVideoDurationConfig").hookConstructor(HookStage.AFTER) { param ->
|
||||
param.thisObject<Any>().apply {
|
||||
setObjectField("_maxSingleItemDurationMs", null)
|
||||
setObjectField("_maxTotalDurationMs", null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class ScriptHookCallback(
|
||||
|
||||
fun arg(index: Int) = hookAdapter.argNullable<Any>(index)
|
||||
|
||||
fun setArg(index: Int, value: Any) {
|
||||
fun setArg(index: Int, value: Any?) {
|
||||
hookAdapter.setArg(index, value.toPrimitiveValue(lazy { parameterTypes[index].name }))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user