feat(YouTube): Add player button to change video quality (#5435)

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
MarcaD 2025-08-03 18:23:46 +03:00 committed by GitHub
parent 6e60ac6963
commit 7bdc32867a
27 changed files with 896 additions and 152 deletions

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M6.61719,9.30859 L6.61719,13.1914 L9.38672,13.1914 L9.38672,14.6914 L10.2715,14.6914 L10.2715,13.1914 L11.502,13.1914 L11.502,12.3086 L10.2715,12.3086 L10.2715,9.30859 L9.38672,9.30859 L9.38672,12.3086 L7.50195,12.3086 L7.50195,9.30859 L6.61719,9.30859 Z M13.0176,9.30859 L13.0176,14.6914 L13.9023,14.6914 L13.9023,12.3262 L16.1914,14.6914 L17.4199,14.6914 L14.7676,11.9609 L17.4199,9.30859 L16.2285,9.30859 L13.9023,11.6348 L13.9023,9.30859 L13.0176,9.30859 Z" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M9.80859,14.6914 L10.6914,14.6914 L10.6914,12.6914 L12.8086,12.6914 L12.8086,14.6914 L13.6914,14.6914 L13.6914,9.30859 L12.8086,9.30859 L12.8086,11.8086 L10.6914,11.8086 L10.6914,9.30859 L9.80859,9.30859 Z M15.0781,14.6914 L17.8828,14.6914 C18.1797,14.6914,18.4336,14.5859,18.6445,14.375 C18.8555,14.1641,18.9609,13.9102,18.9609,13.6172 L18.9609,10.3828 C18.9609,10.0898,18.8555,9.83594,18.6445,9.625 C18.4336,9.41406,18.1797,9.30859,17.8828,9.30859 L15.0781,9.30859 Z M15.9609,13.8086 L15.9609,10.1914 L17.7695,10.1914 C17.8477,10.1914,17.918,10.2227,17.9805,10.2891 C18.043,10.3516,18.0781,10.4219,18.0781,10.5 L18.0781,13.5 C18.0781,13.5781,18.043,13.6484,17.9805,13.7109 C17.918,13.7773,17.8477,13.8086,17.7695,13.8086 Z M5.03906,14.6914 L5.92188,14.6914 L5.92188,12.6172 L7.92188,12.6172 L7.92188,11.7305 L5.92188,11.7305 L5.92188,10.1914 L8.42188,10.1914 L8.42188,9.30859 L5.03906,9.30859 Z M3.61719,19 C3.15625,19,2.76953,18.8477,2.46094,18.5391 C2.15234,18.2305,2,17.8438,2,17.3828 L2,6.61719 C2,6.15625,2.15234,5.76953,2.46094,5.46094 C2.76953,5.15234,3.15625,5,3.61719,5 L20.3828,5 C20.8438,5,21.2305,5.15234,21.5391,5.46094 C21.8477,5.76953,22,6.15625,22,6.61719 L22,17.3828 C22,17.8438,21.8477,18.2305,21.5391,18.5391 C21.2305,18.8477,20.8438,19,20.3828,19 Z M3.61719,18 L20.3828,18 C20.5625,18,20.7109,17.9414,20.8281,17.8281 C20.9414,17.7109,21,17.5625,21,17.3828 L21,6.61719 C21,6.4375,20.9414,6.28906,20.8281,6.17188 C20.7109,6.05859,20.5625,6,20.3828,6 L3.61719,6 C3.4375,6,3.28906,6.05859,3.17188,6.17188 C3.05859,6.28906,3,6.4375,3,6.61719 L3,17.3828 C3,17.5625,3.05859,17.7109,3.17188,17.8281 C3.28906,17.9414,3.4375,18,3.61719,18 Z M3,18 L3,6 Z M3,18" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M5.03906,9.30859 L5.03906,14.6914 L5.92188,14.6914 L5.92188,12.6172 L7.92188,12.6172 L7.92188,11.7305 L5.92188,11.7305 L5.92188,10.1914 L8.42188,10.1914 L8.42188,9.30859 L5.03906,9.30859 Z M9.80859,9.30859 L9.80859,14.6914 L10.6914,14.6914 L10.6914,12.6914 L12.8086,12.6914 L12.8086,14.6914 L13.6914,14.6914 L13.6914,9.30859 L12.8086,9.30859 L12.8086,11.8086 L10.6914,11.8086 L10.6914,9.30859 L9.80859,9.30859 Z M15.0781,9.30859 L15.0781,14.6914 L17.8828,14.6914 C18.1797,14.6914,18.4336,14.5859,18.6445,14.375 C18.8555,14.1641,18.9609,13.9102,18.9609,13.6172 L18.9609,10.3828 C18.9609,10.0898,18.8555,9.83594,18.6445,9.625 C18.4336,9.41406,18.1797,9.30859,17.8828,9.30859 L15.0781,9.30859 Z M15.9609,10.1914 L17.7695,10.1914 C17.8477,10.1914,17.918,10.2227,17.9805,10.2891 C18.043,10.3516,18.0781,10.4219,18.0781,10.5 L18.0781,13.5 C18.0781,13.5781,18.043,13.6484,17.9805,13.7109 C17.918,13.7773,17.8477,13.8086,17.7695,13.8086 L15.9609,13.8086 L15.9609,10.1914 Z M5.03906,15.5098 L5.03906,16.3926 L18.9609,16.3926 L18.9609,15.5098 L5.03906,15.5098 Z" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M6.63867,9.30859 L6.63867,14.6914 L7.52148,14.6914 L7.52148,12.6914 L10.1387,12.6914 L10.1387,14.6914 L11.0215,14.6914 L11.0215,9.30859 L10.1387,9.30859 L10.1387,11.8086 L7.52148,11.8086 L7.52148,9.30859 L6.63867,9.30859 Z M13.0215,9.30859 L13.0215,14.6914 L16.3301,14.6914 C16.627,14.6914,16.877,14.5859,17.0879,14.375 C17.2988,14.1641,17.4043,13.9102,17.4043,13.6172 L17.4043,10.3828 C17.4043,10.0898,17.2988,9.83594,17.0879,9.625 C16.877,9.41406,16.627,9.30859,16.3301,9.30859 L13.0215,9.30859 Z M13.9043,10.1914 L16.2129,10.1914 C16.291,10.1914,16.3613,10.2227,16.4238,10.2891 C16.4902,10.3516,16.5215,10.4219,16.5215,10.5 L16.5215,13.5 C16.5215,13.5781,16.4902,13.6484,16.4238,13.7109 C16.3613,13.7773,16.291,13.8086,16.2129,13.8086 L13.9043,13.8086 L13.9043,10.1914 Z" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M6.61523,9.30859 L6.61523,14.6914 L10.998,14.6914 L10.998,13.8086 L7.49805,13.8086 L7.49805,9.30859 L6.61523,9.30859 Z M13,9.30859 L13,14.6914 L16.3086,14.6914 C16.6048,14.6914,16.8575,14.5878,17.0684,14.377 C17.2792,14.166,17.3848,13.9112,17.3848,13.6152 L17.3848,10.3848 C17.3848,10.0888,17.2792,9.83405,17.0684,9.62305 C16.8575,9.41221,16.6048,9.30859,16.3086,9.30859 L13,9.30859 Z M13.8848,10.1914 L16.1914,10.1914 C16.2684,10.1914,16.3403,10.2249,16.4043,10.2891 C16.4685,10.3531,16.5,10.423,16.5,10.5 L16.5,13.5 C16.5,13.577,16.4685,13.6469,16.4043,13.7109 C16.3403,13.7751,16.2684,13.8086,16.1914,13.8086 L13.8848,13.8086 L13.8848,10.1914 Z" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M5.7168,9.30859 C5.41992,9.30859,5.16602,9.41406,4.95508,9.625 C4.74414,9.83594,4.63867,10.0898,4.63867,10.3828 L4.63867,13.6172 C4.63867,13.9102,4.74414,14.1641,4.95508,14.375 C5.16602,14.5859,5.41992,14.6914,5.7168,14.6914 L6.38867,14.6914 L6.38867,16.1914 L7.27148,16.1914 L7.27148,14.6914 L7.94727,14.6914 C8.24414,14.6914,8.49414,14.5859,8.70508,14.375 C8.91602,14.1641,9.02148,13.9102,9.02148,13.6172 L9.02148,10.3828 C9.02148,10.0898,8.91602,9.83594,8.70508,9.625 C8.49414,9.41406,8.24414,9.30859,7.94727,9.30859 L5.7168,9.30859 Z M10.3086,9.30859 L10.3086,14.6914 L11.1914,14.6914 L11.1914,12.6914 L13.3086,12.6914 L13.3086,14.6914 L14.1914,14.6914 L14.1914,9.30859 L13.3086,9.30859 L13.3086,11.8086 L11.1914,11.8086 L11.1914,9.30859 L10.3086,9.30859 Z M15.4785,9.30859 L15.4785,14.6914 L18.2832,14.6914 C18.5801,14.6914,18.834,14.5859,19.0449,14.375 C19.2559,14.1641,19.3613,13.9102,19.3613,13.6172 L19.3613,10.3828 C19.3613,10.0898,19.2559,9.83594,19.0449,9.625 C18.834,9.41406,18.5801,9.30859,18.2832,9.30859 L15.4785,9.30859 Z M5.83008,10.1914 L7.83008,10.1914 C7.90821,10.1914,7.97852,10.2227,8.04102,10.2891 C8.10742,10.3516,8.13867,10.4219,8.13867,10.5 L8.13867,13.5 C8.13867,13.5781,8.10743,13.6484,8.04102,13.7109 C7.97852,13.7773,7.9082,13.8086,7.83008,13.8086 L5.83008,13.8086 C5.75586,13.8086,5.68164,13.7773,5.61914,13.7109 C5.55664,13.6484,5.52148,13.5781,5.52148,13.5 L5.52148,10.5 C5.52148,10.4219,5.55664,10.3516,5.61914,10.2891 C5.68164,10.2227,5.75586,10.1914,5.83008,10.1914 Z M16.3613,10.1914 L18.1699,10.1914 C18.2481,10.1914,18.3184,10.2227,18.3809,10.2891 C18.4434,10.3516,18.4785,10.4219,18.4785,10.5 L18.4785,13.5 C18.4785,13.5781,18.4434,13.6484,18.3809,13.7109 C18.3184,13.7773,18.248,13.8086,18.1699,13.8086 L16.3613,13.8086 L16.3613,10.1914 Z" />
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 L3.61719,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z M7.30859,9.30859 C7.10209,9.30859,6.93414,9.37055,6.80664,9.49805 C6.67914,9.62571,6.61523,9.79367,6.61523,10 L6.61523,11.6914 C6.61523,11.8979,6.67914,12.0659,6.80664,12.1934 C6.93414,12.3209,7.10209,12.3848,7.30859,12.3848 L10.1152,12.3848 L10.1152,13.8086 L7.5,13.8086 L7.5,13.3086 L6.61523,13.3086 L6.61523,14 C6.61523,14.2063,6.67914,14.3743,6.80664,14.502 C6.93414,14.6295,7.10209,14.6914,7.30859,14.6914 L10.3086,14.6914 C10.5149,14.6914,10.6809,14.6295,10.8086,14.502 C10.9361,14.3743,11,14.2063,11,14 L11,12.3086 C11,12.1021,10.9361,11.9341,10.8086,11.8066 C10.6809,11.6791,10.5149,11.6152,10.3086,11.6152 L7.5,11.6152 L7.5,10.1914 L10.1152,10.1914 L10.1152,10.6914 L11,10.6914 L11,10 C11,9.79367,10.9361,9.62571,10.8086,9.49805 C10.6809,9.37055,10.5149,9.30859,10.3086,9.30859 L7.30859,9.30859 Z M13,9.30859 L13,14.6914 L16.3086,14.6914 C16.6048,14.6914,16.8575,14.5878,17.0684,14.377 C17.2792,14.166,17.3848,13.9112,17.3848,13.6152 L17.3848,10.3848 C17.3848,10.0888,17.2792,9.83405,17.0684,9.62305 C16.8575,9.41221,16.6048,9.30859,16.3086,9.30859 L13,9.30859 Z M13.8848,10.1914 L16.1914,10.1914 C16.2684,10.1914,16.3403,10.2249,16.4043,10.2891 C16.4685,10.3531,16.5,10.423,16.5,10.5 L16.5,13.5 C16.5,13.577,16.4685,13.6469,16.4043,13.7109 C16.3403,13.7751,16.2684,13.8086,16.1914,13.8086 L13.8848,13.8086 L13.8848,10.1914 Z" />
</vector>

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:fillAlpha="0.8"
android:strokeAlpha="0.8"
android:pathData="M3.61719,5 C3.15625,5,2.76953,5.15234,2.46094,5.46094 C2.15234,5.76953,2,6.15625,2,6.61719 L2,17.3828 C2,17.8438,2.15234,18.2305,2.46094,18.5391 C2.76953,18.8477,3.15625,19,3.61719,19 L20.3828,19 C20.8438,19,21.2305,18.8477,21.5391,18.5391 C21.8477,18.2305,22,17.8438,22,17.3828 L22,6.61719 C22,6.15625,21.8477,5.76953,21.5391,5.46094 C21.2305,5.15234,20.8438,5,20.3828,5 Z M3.61719,6 L20.3828,6 C20.5625,6,20.7109,6.05859,20.8281,6.17188 C20.9414,6.28906,21,6.4375,21,6.61719 L21,17.3828 C21,17.5625,20.9414,17.7109,20.8281,17.8281 C20.7109,17.9414,20.5625,18,20.3828,18 L3.61719,18 C3.4375,18,3.28906,17.9414,3.17188,17.8281 C3.05859,17.7109,3,17.5625,3,17.3828 L3,6.61719 C3,6.4375,3.05859,6.28906,3.17188,6.17188 C3.28906,6.05859,3.4375,6,3.61719,6 Z" />
</vector>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-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/revanced_video_quality_dialog_button"
style="@style/YouTubePlayerButton"
android:layout_width="48.0dip"
android:layout_height="60.0dip"
android:paddingTop="6.0dp"
android:paddingBottom="0dp"
android:scaleType="center"
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container"
yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" />
<View
android:id="@+id/revanced_video_quality_dialog_button_placeholder"
android:layout_width="48.0dip"
android:layout_height="60.0dip"
android:visibility="gone"
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container"
yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" />
</android.support.constraint.ConstraintLayout>