feat(YouTube): Update Overlay buttons
, add Hide live chat messages
and more Start page
options (#50)
* feat(YouTube): Add `Hide live chat messages` * feat(YouTube/Overlay buttons): Add ability to reset speed back to default on second tap and hold * feat(YouTube/Overlay buttons): Add `Time-ordered playlist` from channel videos * feat(YouTube/Overlay buttons): Add more icon types and selectable bottom margin * feat(YouTube): Add more start page options * refactor: remove period from speed reset toast * feat(YouTube): Add `Hide live chat replay` * feat(YouTube/Swipe controls): Add adjustable `Swipe overlay screen size` * fix(YouTube/Swipe controls): Normalize default text size * chore: clarify swipe overlay screen size description * chore: remove whitelist icons --------- Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.youtube.player.overlaybuttons
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.booleanPatchOption
|
||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
import app.revanced.patches.youtube.utils.fix.fullscreen.FullscreenButtonViewStubPatch
|
||||
import app.revanced.patches.youtube.utils.fix.suggestedvideoendscreen.SuggestedVideoEndScreenPatch
|
||||
@ -16,6 +16,12 @@ import app.revanced.util.doRecursively
|
||||
import app.revanced.util.patch.BaseResourcePatch
|
||||
import org.w3c.dom.Element
|
||||
|
||||
/**
|
||||
* Patch to add overlay buttons in the YouTube video player.
|
||||
*
|
||||
* This patch integrates various buttons such as copy URL, speed, repeat, etc., into the video player's
|
||||
* control overlay, providing enhanced functionality directly in the player interface.
|
||||
*/
|
||||
@Suppress("DEPRECATION", "unused")
|
||||
object OverlayButtonsPatch : BaseResourcePatch(
|
||||
name = "Overlay buttons",
|
||||
@ -30,39 +36,59 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
),
|
||||
compatiblePackages = COMPATIBLE_PACKAGE
|
||||
) {
|
||||
private val OutlineIcon by booleanPatchOption(
|
||||
key = "OutlineIcon",
|
||||
default = false,
|
||||
title = "Outline icons",
|
||||
description = "Apply the outline icon",
|
||||
required = true
|
||||
private const val DEFAULT_MARGIN = "0.0dip"
|
||||
private const val WIDER_MARGIN = "6.0dip"
|
||||
|
||||
private const val DEFAULT_ICON_KEY = "Rounded"
|
||||
|
||||
// Mapping of icon types to their respective resource folder names
|
||||
private val iconTypes = mapOf(
|
||||
"Bold" to "bold",
|
||||
DEFAULT_ICON_KEY to "rounded",
|
||||
"Thin" to "thin"
|
||||
)
|
||||
|
||||
private val WiderBottomPadding by booleanPatchOption(
|
||||
key = "WiderBottomPadding",
|
||||
default = false,
|
||||
title = "Wider bottom padding",
|
||||
description = "Apply wider bottom padding. Click effect may not be shown in the correct position."
|
||||
// Option to select icon type
|
||||
private val IconType by stringPatchOption(
|
||||
key = "IconType",
|
||||
default = DEFAULT_ICON_KEY,
|
||||
values = iconTypes,
|
||||
title = "Icon type",
|
||||
description = "Apply icon type"
|
||||
)
|
||||
|
||||
override fun execute(context: ResourceContext) {
|
||||
// Option to set bottom margin
|
||||
private val BottomMargin by stringPatchOption(
|
||||
key = "BottomMargin",
|
||||
default = DEFAULT_MARGIN,
|
||||
values = mapOf(
|
||||
"Wider" to WIDER_MARGIN,
|
||||
"Default" to DEFAULT_MARGIN
|
||||
),
|
||||
title = "Bottom margin",
|
||||
description = "Apply bottom margin to Overlay buttons and Timestamp"
|
||||
)
|
||||
|
||||
/**
|
||||
* Inject hook
|
||||
* Main execution method for applying the patch.
|
||||
*
|
||||
* @param context The resource context for patching.
|
||||
*/
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
// Inject hooks for overlay buttons.
|
||||
arrayOf(
|
||||
"AlwaysRepeat;",
|
||||
"CopyVideoUrl;",
|
||||
"CopyVideoUrlTimestamp;",
|
||||
"ExternalDownload;",
|
||||
"SpeedDialog;"
|
||||
"SpeedDialog;",
|
||||
"TimeOrderedPlaylist;"
|
||||
).forEach { className ->
|
||||
PlayerControlsPatch.hookOverlayButtons("$OVERLAY_BUTTONS_PATH/$className")
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy resources
|
||||
*/
|
||||
// Copy necessary resources for the overlay buttons.
|
||||
arrayOf(
|
||||
ResourceGroup(
|
||||
"drawable",
|
||||
@ -74,15 +100,17 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
context.copyResources("youtube/overlaybuttons/shared", resourceGroup)
|
||||
}
|
||||
|
||||
if (OutlineIcon == true) {
|
||||
arrayOf(
|
||||
ResourceGroup(
|
||||
"drawable-xxhdpi",
|
||||
// Apply the selected icon type to the overlay buttons
|
||||
IconType?.let { iconType ->
|
||||
val iconValue = iconType.lowercase()
|
||||
val commonResources = arrayOf(
|
||||
"ic_fullscreen_vertical_button.png",
|
||||
"ic_vr.png",
|
||||
"quantum_ic_fullscreen_exit_grey600_24.png",
|
||||
"quantum_ic_fullscreen_exit_white_24.png",
|
||||
"quantum_ic_fullscreen_grey600_24.png",
|
||||
"quantum_ic_fullscreen_white_24.png",
|
||||
"revanced_time_ordered_playlist.png",
|
||||
"revanced_copy_icon.png",
|
||||
"revanced_copy_icon_with_time.png",
|
||||
"revanced_download_icon.png",
|
||||
@ -93,101 +121,29 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
"yt_outline_screen_full_exit_white_24.png",
|
||||
"yt_outline_screen_full_white_24.png"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/overlaybuttons/outline", resourceGroup)
|
||||
}
|
||||
val specificResources = if (iconValue == "thin") {
|
||||
arrayOf("yt_outline_screen_vertical_vd_theme_24.xml")
|
||||
} else {
|
||||
arrayOf(
|
||||
ResourceGroup(
|
||||
"drawable-xxhdpi",
|
||||
"ic_fullscreen_vertical_button.png",
|
||||
"ic_vr.png",
|
||||
"quantum_ic_fullscreen_exit_grey600_24.png",
|
||||
"quantum_ic_fullscreen_exit_white_24.png",
|
||||
"quantum_ic_fullscreen_grey600_24.png",
|
||||
"quantum_ic_fullscreen_white_24.png",
|
||||
"revanced_copy_icon.png",
|
||||
"revanced_copy_icon_with_time.png",
|
||||
"revanced_download_icon.png",
|
||||
"revanced_speed_icon.png",
|
||||
"yt_fill_arrow_repeat_white_24.png",
|
||||
"yt_outline_arrow_repeat_1_white_24.png",
|
||||
"yt_outline_arrow_shuffle_1_white_24.png",
|
||||
"yt_outline_screen_full_exit_white_24.png",
|
||||
"yt_outline_screen_full_white_24.png",
|
||||
"yt_outline_screen_vertical_vd_theme_24.png"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/overlaybuttons/default", resourceGroup)
|
||||
arrayOf("yt_outline_screen_vertical_vd_theme_24.png")
|
||||
}
|
||||
val resources = commonResources + specificResources
|
||||
resources.forEach { resource ->
|
||||
val folderName = if (resource.endsWith(".xml")) "drawable" else "drawable-xxhdpi"
|
||||
context.copyResources("youtube/overlaybuttons/$iconValue", ResourceGroup(folderName, resource))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge xml nodes from the host to their real xml files
|
||||
*/
|
||||
// Merge XML nodes from the host to their respective XML files.
|
||||
context.copyXmlNode(
|
||||
"youtube/overlaybuttons/shared/host",
|
||||
"layout/youtube_controls_bottom_ui_container.xml",
|
||||
"android.support.constraint.ConstraintLayout"
|
||||
)
|
||||
|
||||
val fullscreenButtonId = if (SettingsPatch.upward1909)
|
||||
"youtube_controls_fullscreen_button_stub"
|
||||
else
|
||||
"fullscreen_button"
|
||||
|
||||
val bottomPadding = if (WiderBottomPadding == true) "31.0dip" else "22.0dip"
|
||||
context.xmlEditor["res/layout/youtube_controls_bottom_ui_container.xml"].use { editor ->
|
||||
editor.file.doRecursively loop@{
|
||||
if (it !is Element) return@loop
|
||||
|
||||
// Change the relationship between buttons
|
||||
it.getAttributeNode("yt:layout_constraintRight_toLeftOf")?.let { attribute ->
|
||||
if (attribute.textContent == "@id/fullscreen_button") {
|
||||
attribute.textContent = "@+id/speed_dialog_button"
|
||||
}
|
||||
}
|
||||
|
||||
it.getAttributeNode("android:id")?.let { attribute ->
|
||||
// Adjust Fullscreen Button size and padding
|
||||
arrayOf(
|
||||
"speed_dialog_button",
|
||||
"copy_video_url_button",
|
||||
"copy_video_url_timestamp_button",
|
||||
"always_repeat_button",
|
||||
"external_download_button",
|
||||
fullscreenButtonId
|
||||
).forEach { targetId ->
|
||||
if (attribute.textContent.endsWith(targetId)) {
|
||||
arrayOf(
|
||||
"0.0dip" to arrayOf("paddingLeft", "paddingRight"),
|
||||
bottomPadding to arrayOf("paddingBottom"),
|
||||
"48.0dip" to arrayOf("layout_height", "layout_width")
|
||||
).forEach { (replace, attributes) ->
|
||||
attributes.forEach { name ->
|
||||
it.getAttributeNode("android:$name")?.textContent = replace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (WiderBottomPadding == false) {
|
||||
// Adjust TimeBar and Chapter bottom padding
|
||||
arrayOf(
|
||||
"@id/time_bar_chapter_title" to "14.0dip",
|
||||
"@id/timestamps_container" to "12.0dip"
|
||||
).forEach { (id, replace) ->
|
||||
it.getAttributeNode("android:id")?.let { attribute ->
|
||||
if (attribute.textContent == id) {
|
||||
it.getAttributeNode("android:paddingBottom").textContent = replace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
val marginBottom = BottomMargin
|
||||
?: DEFAULT_MARGIN
|
||||
|
||||
// Modify the layout of fullscreen button for newer YouTube versions (19.09.xx+)
|
||||
arrayOf(
|
||||
"youtube_controls_cf_fullscreen_button.xml",
|
||||
"youtube_controls_fullscreen_button.xml"
|
||||
@ -195,31 +151,84 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
val targetXml = context["res"].resolve("layout").resolve(xmlFile)
|
||||
if (targetXml.exists()) {
|
||||
context.xmlEditor["res/layout/$xmlFile"].use { editor ->
|
||||
editor.file.doRecursively loop@{
|
||||
if (it !is Element) return@loop
|
||||
editor.file.doRecursively loop@{ node ->
|
||||
if (node !is Element) return@loop
|
||||
|
||||
it.getAttributeNode("android:id")?.let { attribute ->
|
||||
// Adjust Fullscreen Button size and padding
|
||||
if (attribute.textContent.endsWith("fullscreen_button")) {
|
||||
if (node.getAttribute("android:id").endsWith("_button")) {
|
||||
node.setAttribute("android:layout_marginBottom", marginBottom)
|
||||
node.setAttribute("android:paddingLeft", "0.0dip")
|
||||
node.setAttribute("android:paddingRight", "0.0dip")
|
||||
node.setAttribute("android:paddingBottom", "22.0dip")
|
||||
if (!node.getAttribute("android:layout_height").equals("0.0dip") &&
|
||||
!node.getAttribute("android:layout_width").equals("0.0dip")
|
||||
) {
|
||||
node.setAttribute("android:layout_height", "48.0dip")
|
||||
node.setAttribute("android:layout_width", "48.0dip")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
context.xmlEditor["res/layout/youtube_controls_bottom_ui_container.xml"].use { editor ->
|
||||
editor.file.doRecursively loop@{ node ->
|
||||
if (node !is Element) return@loop
|
||||
|
||||
// Change the relationship between buttons
|
||||
node.getAttributeNode("yt:layout_constraintRight_toLeftOf")
|
||||
?.let { attribute ->
|
||||
if (attribute.textContent == "@id/fullscreen_button") {
|
||||
attribute.textContent = "@+id/speed_dialog_button"
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust TimeBar and Chapter bottom padding
|
||||
arrayOf(
|
||||
"0.0dip" to arrayOf("paddingLeft", "paddingRight"),
|
||||
bottomPadding to arrayOf("paddingBottom"),
|
||||
"48.0dip" to arrayOf("layout_height", "layout_width")
|
||||
).forEach { (replace, attributes) ->
|
||||
attributes.forEach { name ->
|
||||
it.getAttributeNode("android:$name")?.textContent = replace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"@id/time_bar_chapter_title" to "16.0dip",
|
||||
"@id/timestamps_container" to "14.0dip"
|
||||
).forEach { (id, replace) ->
|
||||
node.getAttributeNode("android:id")?.let { attribute ->
|
||||
if (attribute.textContent == id) {
|
||||
node.getAttributeNode("android:paddingBottom").textContent =
|
||||
replace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust layout for fullscreen button stub
|
||||
if (node.getAttribute("android:id") == "@id/youtube_controls_fullscreen_button_stub") {
|
||||
node.setAttribute("android:layout_marginBottom", marginBottom)
|
||||
if (!node.getAttribute("android:layout_height").equals("0.0dip") &&
|
||||
!node.getAttribute("android:layout_width").equals("0.0dip")
|
||||
) {
|
||||
node.setAttribute("android:layout_height", "48.0dip")
|
||||
node.setAttribute("android:layout_width", "48.0dip")
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust margin and padding for other buttons
|
||||
if (node.getAttribute("android:id").endsWith("_button")) {
|
||||
node.setAttribute("android:layout_marginBottom", marginBottom)
|
||||
node.setAttribute("android:paddingLeft", "0.0dip")
|
||||
node.setAttribute("android:paddingRight", "0.0dip")
|
||||
node.setAttribute("android:paddingBottom", "22.0dip")
|
||||
if (!node.getAttribute("android:layout_height").equals("0.0dip") &&
|
||||
!node.getAttribute("android:layout_width").equals("0.0dip")
|
||||
) {
|
||||
node.setAttribute("android:layout_height", "48.0dip")
|
||||
node.setAttribute("android:layout_width", "48.0dip")
|
||||
}
|
||||
} else if (node.getAttribute("android:id") == "@id/time_bar_chapter_title_container" ||
|
||||
node.getAttribute("android:id") == "@id/timestamps_container"
|
||||
) {
|
||||
node.setAttribute("android:layout_marginBottom", marginBottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add settings
|
||||
* Add settings for the overlay buttons.
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
@ -229,6 +238,7 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
)
|
||||
)
|
||||
|
||||
// Update the patch status in settings to reflect the applied changes
|
||||
SettingsPatch.updatePatchStatus(this)
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 657 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
@ -2,7 +2,8 @@
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto" android:id="@+id/youtube_controls_bottom_ui_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layoutDirection="ltr">
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/speed_dialog_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_speed_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_icon_with_time" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_icon_with_time" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/time_ordered_playlist_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/time_ordered_playlist_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_time_ordered_playlist" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_repeat_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/external_download_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_download_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" style="@style/YouTubePlayerButton"/>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 617 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 856 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 213 B |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector android:tint="?colorControlNormal" android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M 4.74 19.2513 L 4.74 15.3136 L 5.615 15.3125 L 5.615 18.3775 L 8.6775 18.3775 L 8.6776 19.2513 L 4.74 19.2513 Z M 15.3224 19.2513 L 15.3225 18.3775 L 18.385 18.3775 L 18.385 15.3125 L 19.26 15.3136 L 19.26 19.2513 L 15.3224 19.2513 Z M 4.74 8.6863 L 4.74 4.7487 L 8.6776 4.7487 L 8.6775 5.6225 L 5.615 5.6225 L 5.615 8.6875 L 4.74 8.6863 Z M 18.3849 8.6863 L 18.385 5.6225 L 15.3225 5.6225 L 15.3224 4.7487 L 19.26 4.7487 L 19.26 8.6863 L 18.385 8.6875 L 18.3849 8.6863 Z" />
|
||||
</vector>
|
@ -30,8 +30,15 @@
|
||||
<item>@string/revanced_change_start_page_entry_shorts</item>
|
||||
<item>@string/revanced_change_start_page_entry_library</item>
|
||||
<item>@string/revanced_change_start_page_entry_liked_videos</item>
|
||||
<item>@string/revanced_change_start_page_entry_watch_later</item>
|
||||
<item>@string/revanced_change_start_page_entry_history</item>
|
||||
<item>@string/revanced_change_start_page_entry_trending</item>
|
||||
<item>@string/revanced_change_start_page_entry_gaming</item>
|
||||
<item>@string/revanced_change_start_page_entry_live</item>
|
||||
<item>@string/revanced_change_start_page_entry_music</item>
|
||||
<item>@string/revanced_change_start_page_entry_movies</item>
|
||||
<item>@string/revanced_change_start_page_entry_sports</item>
|
||||
<item>@string/revanced_change_start_page_entry_browse</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_change_start_page_entry_values">
|
||||
<item></item>
|
||||
@ -43,8 +50,15 @@
|
||||
<!-- YouTube Widgets -->
|
||||
<item>www.youtube.com/feed/library</item>
|
||||
<item>www.youtube.com/playlist?list=LL</item>
|
||||
<item>www.youtube.com/playlist?list=WL</item>
|
||||
<item>www.youtube.com/feed/history</item>
|
||||
<item>www.youtube.com/feed/trending</item>
|
||||
<item>www.youtube.com/gaming</item>
|
||||
<item>www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig</item>
|
||||
<item>www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ</item>
|
||||
<item>www.youtube.com/feed/storefront?bp=ogUCKAI%3D</item>
|
||||
<item>www.youtube.com/channel/UCEgdi0XIXXZ-qJOFPf4JSKw</item>
|
||||
<item>www.youtube.com/feed/guide_builder</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_change_shorts_repeat_state_entries">
|
||||
<item>@string/revanced_change_shorts_repeat_state_entry_default</item>
|
||||
|
@ -271,15 +271,22 @@ Limitations:
|
||||
<string name="revanced_preference_screen_general_title">General</string>
|
||||
|
||||
<string name="revanced_change_start_page_title">Change start page</string>
|
||||
<string name="revanced_change_start_page_entry_browse">Browse channels</string>
|
||||
<string name="revanced_change_start_page_entry_default">Default</string>
|
||||
<string name="revanced_change_start_page_entry_explore">Explore</string>
|
||||
<string name="revanced_change_start_page_entry_gaming">Gaming</string>
|
||||
<string name="revanced_change_start_page_entry_history">History</string>
|
||||
<string name="revanced_change_start_page_entry_library">Library</string>
|
||||
<string name="revanced_change_start_page_entry_liked_videos">Liked videos</string>
|
||||
<string name="revanced_change_start_page_entry_live">Live</string>
|
||||
<string name="revanced_change_start_page_entry_movies">Movies</string>
|
||||
<string name="revanced_change_start_page_entry_music">Music</string>
|
||||
<string name="revanced_change_start_page_entry_search">Search</string>
|
||||
<string name="revanced_change_start_page_entry_shorts">Shorts</string>
|
||||
<string name="revanced_change_start_page_entry_sports">Sports</string>
|
||||
<string name="revanced_change_start_page_entry_subscriptions">Subscriptions</string>
|
||||
<string name="revanced_change_start_page_entry_trending">Trending</string>
|
||||
<string name="revanced_change_start_page_entry_watch_later">Watch later</string>
|
||||
<string name="revanced_change_start_page_warning">Invalid start page, resetting to default.</string>
|
||||
<string name="revanced_disable_auto_audio_tracks_title">Disable forced auto audio tracks</string>
|
||||
<string name="revanced_disable_auto_audio_tracks_summary_on">Forced auto audio tracks are disabled.</string>
|
||||
@ -486,6 +493,9 @@ Note:
|
||||
<string name="revanced_hide_info_panel_title">Hide info panels</string>
|
||||
<string name="revanced_hide_info_panel_summary_on">Info panels are hidden.</string>
|
||||
<string name="revanced_hide_info_panel_summary_off">Info panels are shown.</string>
|
||||
<string name="revanced_hide_live_chat_messages_title">Hide live chat messages</string>
|
||||
<string name="revanced_hide_live_chat_messages_summary_on">Live chat messages are hidden.\n\nThis setting applies to Shorts live videos too.</string>
|
||||
<string name="revanced_hide_live_chat_messages_summary_off">Live chat messages are shown.\n\nThis setting applies to Shorts live videos too.</string>
|
||||
<string name="revanced_hide_medical_panel_title">Hide medical panels</string>
|
||||
<string name="revanced_hide_medical_panel_summary_on">Medical panels are hidden.</string>
|
||||
<string name="revanced_hide_medical_panel_summary_off">Medical panels are shown.</string>
|
||||
@ -675,12 +685,15 @@ Note:
|
||||
<string name="revanced_show_video_title_section_summary">"Shows the video title section in fullscreen.
|
||||
|
||||
Limitation: Video title disappears when clicked."</string>
|
||||
<string name="revanced_hide_autoplay_preview_title">Hide autoplay preview container</string>
|
||||
<string name="revanced_hide_autoplay_preview_summary_on">Autoplay preview container is hidden.</string>
|
||||
<string name="revanced_hide_autoplay_preview_summary_off">Autoplay preview container is shown.</string>
|
||||
<string name="revanced_hide_autoplay_preview_title">Hide autoplay preview container</string>
|
||||
<string name="revanced_hide_live_chat_replay_button_title">Hide live chat replay button</string>
|
||||
<string name="revanced_hide_live_chat_replay_button_summary_on">Live chat replay button is hidden.\n\nIt appears in fullscreen when closing live chat.</string>
|
||||
<string name="revanced_hide_live_chat_replay_button_summary_off">Live chat replay button is shown.\n\nIt appears in fullscreen when closing live chat.</string>
|
||||
<string name="revanced_hide_related_video_overlay_title">Hide related video overlay</string>
|
||||
<string name="revanced_hide_related_video_overlay_summary_on">Related video overlay is hidden.</string>
|
||||
<string name="revanced_hide_related_video_overlay_summary_off">Related video overlay is shown.</string>
|
||||
<string name="revanced_hide_related_video_overlay_title">Hide related video overlay</string>
|
||||
|
||||
<!-- PreferenceScreen: Player, PreferenceCategory: Player, PreferenceScreen: Fullscreen, PreferenceCategory: Quick actions -->
|
||||
<string name="revanced_preference_category_quick_actions">Quick actions</string>
|
||||
@ -800,7 +813,10 @@ Tap and hold to copy video timestamp."</string>
|
||||
<string name="revanced_overlay_button_speed_dialog_title">Show speed dialog button</string>
|
||||
<string name="revanced_overlay_button_speed_dialog_summary">"Tap to open speed dialog.
|
||||
Tap and hold to set playback speed to 1.0x."</string>
|
||||
<string name="revanced_overlay_button_speed_dialog_reset">Playback speed reseted (1.0x).</string>
|
||||
<string name="revanced_overlay_button_speed_dialog_reset">Playback speed reset: %sx</string>
|
||||
<string name="revanced_overlay_button_time_ordered_playlist_title">Show time-ordered playlist button</string>
|
||||
<string name="revanced_overlay_button_time_ordered_playlist_summary">"Tap to generate a playlist of all videos from channel from oldest to newest.
|
||||
Tap and hold to undo."</string>
|
||||
<string name="revanced_overlay_button_not_allowed_warning">Tap and hold to change button state.</string>
|
||||
|
||||
<string name="revanced_external_downloader_package_name_title">External downloader package name</string>
|
||||
@ -1034,6 +1050,9 @@ Limitation: Official headers in search results will be hidden."</string>
|
||||
<string name="revanced_swipe_magnitude_threshold_summary">The amount of threshold for swipe to occur.</string>
|
||||
<string name="revanced_swipe_overlay_text_size_title">Swipe overlay text size</string>
|
||||
<string name="revanced_swipe_overlay_text_size_summary">The text size for swipe overlay.</string>
|
||||
<string name="revanced_swipe_overlay_rect_size_title">Swipe overlay screen size</string>
|
||||
<string name="revanced_swipe_overlay_rect_size_summary">Percentage of swipeable screen area.\n\nNote: This will also change the size of the screen area for the double-tap-to-seek gesture.</string>
|
||||
<string name="revanced_swipe_overlay_rect_size_warning">Swipeable area size cannot be more than %s%%. Reset to default value.</string>
|
||||
<string name="revanced_swipe_overlay_timeout_title">Swipe overlay timeout</string>
|
||||
<string name="revanced_swipe_overlay_timeout_summary">The amount of milliseconds the overlay is visible.</string>
|
||||
<string name="revanced_disable_hdr_auto_brightness_title">Disable auto HDR brightness</string>
|
||||
|
@ -287,6 +287,7 @@
|
||||
<SwitchPreference android:title="@string/revanced_disable_engagement_panel_title" android:key="revanced_disable_engagement_panel" android:defaultValue="false" android:summaryOn="@string/revanced_disable_engagement_panel_summary_on" android:summaryOff="@string/revanced_disable_engagement_panel_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_show_video_title_section_title" android:key="revanced_show_video_title_section" android:defaultValue="true" android:summary="@string/revanced_show_video_title_section_summary" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_autoplay_preview_title" android:key="revanced_hide_autoplay_preview" android:defaultValue="false" android:summaryOn="@string/revanced_hide_autoplay_preview_summary_on" android:summaryOff="@string/revanced_hide_autoplay_preview_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_live_chat_replay_button_title" android:key="revanced_hide_live_chat_replay_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_live_chat_replay_button_summary_on" android:summaryOff="@string/revanced_hide_live_chat_replay_button_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_related_video_overlay_title" android:key="revanced_hide_related_video_overlay" android:defaultValue="false" android:summaryOn="@string/revanced_hide_related_video_overlay_summary_on" android:summaryOff="@string/revanced_hide_related_video_overlay_summary_off" />
|
||||
<PreferenceCategory android:title="@string/revanced_preference_category_quick_actions" android:layout="@layout/revanced_settings_preferences_category">
|
||||
<SwitchPreference android:title="@string/revanced_hide_quick_actions_title" android:key="revanced_hide_quick_actions" android:defaultValue="false" android:summaryOn="@string/revanced_hide_quick_actions_summary_on" android:summaryOff="@string/revanced_hide_quick_actions_summary_off" />
|
||||
@ -342,6 +343,7 @@
|
||||
<SwitchPreference android:title="@string/revanced_overlay_button_copy_video_url_timestamp_title" android:key="revanced_overlay_button_copy_video_url_timestamp" android:defaultValue="false" android:summary="@string/revanced_overlay_button_copy_video_url_timestamp_summary" />
|
||||
<SwitchPreference android:title="@string/revanced_overlay_button_external_downloader_title" android:key="revanced_overlay_button_external_downloader" android:defaultValue="false" android:summary="@string/revanced_overlay_button_external_downloader_summary" />
|
||||
<SwitchPreference android:title="@string/revanced_overlay_button_speed_dialog_title" android:key="revanced_overlay_button_speed_dialog" android:defaultValue="false" android:summary="@string/revanced_overlay_button_speed_dialog_summary" />
|
||||
<SwitchPreference android:title="@string/revanced_overlay_button_time_ordered_playlist_title" android:key="revanced_overlay_button_time_ordered_playlist" android:defaultValue="false" android:summary="@string/revanced_overlay_button_time_ordered_playlist_summary" />
|
||||
<app.revanced.integrations.youtube.settings.preference.ExternalDownloaderPreference android:title="@string/revanced_external_downloader_package_name_title" android:summary="@string/revanced_external_downloader_package_name_summary" />
|
||||
<PreferenceCategory android:title="@string/revanced_preference_category_experimental_flag" android:layout="@layout/revanced_settings_preferences_category" />
|
||||
<SwitchPreference android:title="@string/revanced_external_downloader_action_title" android:key="revanced_external_downloader_action" android:defaultValue="false" android:summaryOn="@string/revanced_external_downloader_action_summary_on" android:summaryOff="@string/revanced_external_downloader_action_summary_off" />SETTINGS: OVERLAY_BUTTONS -->
|
||||
@ -399,6 +401,7 @@
|
||||
<SwitchPreference android:title="@string/revanced_hide_filmstrip_overlay_title" android:key="revanced_hide_filmstrip_overlay" android:defaultValue="false" android:summaryOn="@string/revanced_hide_filmstrip_overlay_summary_on" android:summaryOff="@string/revanced_hide_filmstrip_overlay_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_info_cards_title" android:key="revanced_hide_info_cards" android:defaultValue="false" android:summaryOn="@string/revanced_hide_info_cards_summary_on" android:summaryOff="@string/revanced_hide_info_cards_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_info_panel_title" android:key="revanced_hide_info_panel" android:defaultValue="true" android:summaryOn="@string/revanced_hide_info_panel_summary_on" android:summaryOff="@string/revanced_hide_info_panel_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_live_chat_messages_title" android:key="revanced_hide_live_chat_messages" android:defaultValue="false" android:summaryOn="@string/revanced_hide_live_chat_messages_summary_on" android:summaryOff="@string/revanced_hide_live_chat_messages_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_medical_panel_title" android:key="revanced_hide_medical_panel" android:defaultValue="true" android:summaryOn="@string/revanced_hide_medical_panel_summary_on" android:summaryOff="@string/revanced_hide_medical_panel_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_seek_message_title" android:key="revanced_hide_seek_message" android:defaultValue="false" android:summaryOn="@string/revanced_hide_seek_message_summary_on" android:summaryOff="@string/revanced_hide_seek_message_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_hide_seek_undo_message_title" android:key="revanced_hide_seek_undo_message" android:defaultValue="false" android:summaryOn="@string/revanced_hide_seek_undo_message_summary_on" android:summaryOff="@string/revanced_hide_seek_undo_message_summary_off" />
|
||||
@ -473,7 +476,8 @@
|
||||
<SwitchPreference android:title="@string/revanced_swipe_gestures_lock_mode_title" android:key="revanced_swipe_gestures_lock_mode" android:defaultValue="false" android:summaryOn="@string/revanced_swipe_gestures_lock_mode_summary_on" android:summaryOff="@string/revanced_swipe_gestures_lock_mode_summary_off" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_background_alpha_title" android:key="revanced_swipe_overlay_background_alpha" android:summary="@string/revanced_swipe_overlay_background_alpha_summary" android:defaultValue="127" android:inputType="number" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_magnitude_threshold_title" android:key="revanced_swipe_magnitude_threshold" android:summary="@string/revanced_swipe_magnitude_threshold_summary" android:defaultValue="0" android:inputType="number" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_text_size_title" android:key="revanced_swipe_overlay_text_size" android:summary="@string/revanced_swipe_overlay_text_size_summary" android:defaultValue="27" android:inputType="number" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_text_size_title" android:key="revanced_swipe_overlay_text_size" android:summary="@string/revanced_swipe_overlay_text_size_summary" android:defaultValue="20" android:inputType="number" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_rect_size_title" android:key="revanced_swipe_overlay_rect_size" android:summary="@string/revanced_swipe_overlay_rect_size_summary" android:defaultValue="20" android:inputType="number" />
|
||||
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_timeout_title" android:key="revanced_swipe_overlay_timeout" android:summary="@string/revanced_swipe_overlay_timeout_summary" android:defaultValue="500" android:inputType="number" />PREFERENCE_SCREEN: SWIPE_CONTROLS -->
|
||||
|
||||
<!-- PREFERENCE_CATEGORY: SWIPE_CONTROLS_EXPERIMENTAL_FLAGS
|
||||
|