Skip to content

Commit

Permalink
fix(YouTube - Playback speed): Remember playback speed when using non…
Browse files Browse the repository at this point in the history
… 1.0x default speed

This code was previously present with PR #3810 but was accidentally left out during the DSL migration.
  • Loading branch information
LisoUseInAIKyrios committed Nov 11, 2024
1 parent 5e34910 commit 05b9f87
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,14 @@ private fun getReference(instructions: List<BuilderInstruction>, offset: Int, op
/**
* Hook the video speed selected by the user.
*/
fun userSelectedPlaybackSpeedHook(targetMethodClass: String, targetMethodName: String) =
fun userSelectedPlaybackSpeedHook(targetMethodClass: String, targetMethodName: String) {
legacySpeedSelectionInsertMethod.addInstruction(
legacySpeedSelectionInsertIndex++,
"invoke-static { v$legacySpeedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V"
)

speedSelectionInsertMethod.addInstruction(
speedSelectionInsertIndex++,
"invoke-static {v$speedSelectionValueRegister}, $targetMethodClass->$targetMethodName(F)V",
"invoke-static { v$speedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V",
)
}

0 comments on commit 05b9f87

Please sign in to comment.