mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 23:24:28 +02:00
fix(YouTube): Playback speed sometimes changes to 1.0x in PiP mode (unpatched YouTube bug)
This commit is contained in:
parent
6c37959f18
commit
08202866e7
@ -9,7 +9,7 @@ public class PlaybackSpeedWhilePlayingPatch {
|
|||||||
|
|
||||||
public static boolean playbackSpeedChanged(float playbackSpeed) {
|
public static boolean playbackSpeedChanged(float playbackSpeed) {
|
||||||
if (playbackSpeed == DEFAULT_YOUTUBE_PLAYBACK_SPEED &&
|
if (playbackSpeed == DEFAULT_YOUTUBE_PLAYBACK_SPEED &&
|
||||||
PlayerType.getCurrent().isMaximizedOrFullscreen()) {
|
PlayerType.getCurrent().isMaximizedOrFullscreenOrPiP()) {
|
||||||
|
|
||||||
Logger.printDebug(() -> "Even though playback has already started and the user has not changed the playback speed, " +
|
Logger.printDebug(() -> "Even though playback has already started and the user has not changed the playback speed, " +
|
||||||
"the app attempts to change the playback speed to 1.0x." +
|
"the app attempts to change the playback speed to 1.0x." +
|
||||||
|
@ -137,6 +137,14 @@ enum class PlayerType {
|
|||||||
return this == WATCH_WHILE_MAXIMIZED || this == WATCH_WHILE_FULLSCREEN
|
return this == WATCH_WHILE_MAXIMIZED || this == WATCH_WHILE_FULLSCREEN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the current player type is
|
||||||
|
* [WATCH_WHILE_MAXIMIZED], [WATCH_WHILE_FULLSCREEN], [WATCH_WHILE_PICTURE_IN_PICTURE]
|
||||||
|
*/
|
||||||
|
fun isMaximizedOrFullscreenOrPiP(): Boolean {
|
||||||
|
return isMaximizedOrFullscreen() || this == WATCH_WHILE_PICTURE_IN_PICTURE
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the current player type is
|
* Check if the current player type is
|
||||||
* [WATCH_WHILE_FULLSCREEN], [WATCH_WHILE_SLIDING_MAXIMIZED_FULLSCREEN].
|
* [WATCH_WHILE_FULLSCREEN], [WATCH_WHILE_SLIDING_MAXIMIZED_FULLSCREEN].
|
||||||
|
Loading…
x
Reference in New Issue
Block a user