fix(youtube/integrations): allow playback of embedded videos (#2092)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:

committed by
GitHub

parent
ac4f49191d
commit
8a43d75e2d
@ -9,6 +9,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.Method
|
||||
|
||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||
@ -24,10 +25,21 @@ abstract class AbstractIntegrationsPatch(
|
||||
* @see MethodFingerprint
|
||||
*/
|
||||
abstract class IntegrationsFingerprint(
|
||||
returnType: String? = null,
|
||||
access: Int? = null,
|
||||
parameters: Iterable<String>? = null,
|
||||
opcodes: Iterable<Opcode?>? = null,
|
||||
strings: Iterable<String>? = null,
|
||||
customFingerprint: ((methodDef: Method) -> Boolean)? = null,
|
||||
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
|
||||
) : MethodFingerprint(strings = strings, customFingerprint = customFingerprint) {
|
||||
) : MethodFingerprint(
|
||||
returnType,
|
||||
access,
|
||||
parameters,
|
||||
opcodes,
|
||||
strings,
|
||||
customFingerprint
|
||||
) {
|
||||
fun invoke(integrationsDescriptor: String): PatchResult {
|
||||
result?.mutableMethod?.let { method ->
|
||||
val contextRegister = contextRegisterResolver(method)
|
||||
|
Reference in New Issue
Block a user