mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-29 21:10:20 +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
|
// chat camera roll grid
|
||||||
findClass("com.snap.impala.common.media.MediaLibraryItem").hookConstructor(HookStage.BEFORE) { param ->
|
findClass("com.snap.composer.memories.MemoriesPickerVideoDurationConfig").hookConstructor(HookStage.AFTER) { param ->
|
||||||
//set the video length argument
|
param.thisObject<Any>().apply {
|
||||||
param.setArg(3, -1L)
|
setObjectField("_maxSingleItemDurationMs", null)
|
||||||
|
setObjectField("_maxTotalDurationMs", null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class ScriptHookCallback(
|
|||||||
|
|
||||||
fun arg(index: Int) = hookAdapter.argNullable<Any>(index)
|
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 }))
|
hookAdapter.setArg(index, value.toPrimitiveValue(lazy { parameterTypes[index].name }))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user