mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 13:47:42 +02:00
feat(youtube/default-video-quality): add Skip dummy segment
setting (Experimental Flags)
This commit is contained in:
@ -14,6 +14,8 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.fingerprints.NewFlyoutPanelOnClickListenerFingerprint
|
||||
import app.revanced.patches.youtube.utils.overridequality.patch.OverrideQualityHookPatch
|
||||
import app.revanced.patches.youtube.utils.overridespeed.patch.OverrideSpeedHookPatch
|
||||
import app.revanced.patches.youtube.utils.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch.Companion.contexts
|
||||
import app.revanced.patches.youtube.utils.videoid.general.patch.VideoIdPatch
|
||||
@ -30,9 +32,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@DependsOn(
|
||||
[
|
||||
OverrideQualityHookPatch::class,
|
||||
OverrideSpeedHookPatch::class,
|
||||
PlayerTypeHookPatch::class,
|
||||
SettingsPatch::class,
|
||||
VideoIdPatch::class,
|
||||
VideoIdWithoutShortsPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
@ -80,6 +84,8 @@ class VideoQualityPatch : BytecodePatch(
|
||||
VideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
|
||||
VideoIdWithoutShortsPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
|
||||
|
||||
VideoIdWithoutShortsPatch.injectCall("$INTEGRATIONS_RELOAD_VIDEO_CLASS_DESCRIPTOR->setVideoId(Ljava/lang/String;)V")
|
||||
|
||||
/**
|
||||
* Copy arrays
|
||||
*/
|
||||
@ -103,5 +109,7 @@ class VideoQualityPatch : BytecodePatch(
|
||||
private companion object {
|
||||
const val INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR =
|
||||
"$VIDEO_PATH/VideoQualityPatch;"
|
||||
const val INTEGRATIONS_RELOAD_VIDEO_CLASS_DESCRIPTOR =
|
||||
"$VIDEO_PATH/ReloadVideoPatch;"
|
||||
}
|
||||
}
|
@ -621,6 +621,16 @@ Since these setting is quite outdated, it may not be valid"</string>
|
||||
<string name="revanced_shorts_player_title">Shorts player</string>
|
||||
<string name="revanced_show_fullscreen_title_summary">Known issue: Title disappears when clicked</string>
|
||||
<string name="revanced_show_fullscreen_title_title">Show fullscreen title</string>
|
||||
<string name="revanced_skipped_dummy">Skipped dummy segment</string>
|
||||
<string name="revanced_skip_dummy_segment_summary">"Skip dummy segment at video start to bypass video quality enforcement delays on the server side
|
||||
|
||||
• If the video length is less than 10 seconds, it will not be skipped
|
||||
• When the video starts, there is a delay of approximately 0.7 seconds, but the default video quality is applied immediately
|
||||
• Video quality enforcement delays for HDR video are not bypassed"</string>
|
||||
<string name="revanced_skip_dummy_segment_title">Skip dummy segment</string>
|
||||
<string name="revanced_skip_dummy_segment_toast_summary_off">Toast is hidden</string>
|
||||
<string name="revanced_skip_dummy_segment_toast_summary_on">Toast is shown</string>
|
||||
<string name="revanced_skip_dummy_segment_toast_title">Show a toast when skipped</string>
|
||||
<string name="revanced_speed_overlay_text" formatted="false">Playing at %sx speed</string>
|
||||
<string name="revanced_spoof_app_version_summary">"Spoofing the client version to the old version
|
||||
|
||||
|
@ -646,7 +646,10 @@
|
||||
<SwitchPreference android:title="@string/revanced_enable_save_playback_speed_title" android:key="revanced_enable_save_playback_speed" android:defaultValue="false" android:summaryOn="@string/revanced_enable_save_playback_speed_summary_on" android:summaryOff="@string/revanced_enable_save_playback_speed_summary_off" />SETTINGS: DEFAULT_PLAYBACK_SPEED -->
|
||||
|
||||
<!-- SETTINGS: DEFAULT_VIDEO_QUALITY
|
||||
<SwitchPreference android:title="@string/revanced_enable_save_video_quality_title" android:key="revanced_enable_save_video_quality" android:defaultValue="true" android:summaryOn="@string/revanced_enable_save_video_quality_summary_on" android:summaryOff="@string/revanced_enable_save_video_quality_summary_off" />SETTINGS: DEFAULT_VIDEO_QUALITY -->
|
||||
<SwitchPreference android:title="@string/revanced_enable_save_video_quality_title" android:key="revanced_enable_save_video_quality" android:defaultValue="true" android:summaryOn="@string/revanced_enable_save_video_quality_summary_on" android:summaryOff="@string/revanced_enable_save_video_quality_summary_off" />
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_experimental_flag" />
|
||||
<SwitchPreference android:title="@string/revanced_skip_dummy_segment_title" android:key="revanced_skip_dummy_segment" android:defaultValue="false" android:summary="@string/revanced_skip_dummy_segment_summary" />
|
||||
<SwitchPreference android:title="@string/revanced_skip_dummy_segment_toast_title" android:key="revanced_skip_dummy_segment_toast" android:defaultValue="true" android:summaryOn="@string/revanced_skip_dummy_segment_toast_summary_on" android:summaryOff="@string/revanced_skip_dummy_segment_toast_summary_off" android:dependency="revanced_skip_dummy_segment" />SETTINGS: DEFAULT_VIDEO_QUALITY -->
|
||||
|
||||
<!-- PREFERENCE: VIDEO_SETTINGS
|
||||
</PreferenceScreen>PREFERENCE: VIDEO_SETTINGS -->
|
||||
|
Reference in New Issue
Block a user