Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically set video quality #50

Open
insin opened this issue Aug 6, 2024 · 1 comment
Open

Automatically set video quality #50

insin opened this issue Aug 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@insin
Copy link
Owner

insin commented Aug 6, 2024

There's an expando API on the #movie_player element:

>> Object.keys(movie_player).filter(k => k.toLowerCase().includes('quality')).sort()
← Array(11) [ "getAvailableQualityData", "getAvailableQualityDataAndMessaging", "getAvailableQualityLabels", "getAvailableQualityLevels", "getMaxPlaybackQuality", "getPlaybackQuality", "getPlaybackQualityLabel", "getPreferredQuality", "getUserPlaybackQualityPreference", "setPlaybackQuality", … ]
>> movie_player.getAvailableQualityLevels()
← Array(5) [ "hd1080", "hd720", "medium", "tiny", "auto" ]

setPlayBackQuality(quality) doesn't seem to do anything (just a web component setter method perhaps?), but setPlaybackQualityRange(quality) does what we want

Quality data from an 8K video:

>> movie_player.getAvailableQualityData()
←  Array(9) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…} ]
0: Object { qualityLabel: "4320p60", quality: "highres", isPlayable: true, … }
1: Object { qualityLabel: "2160p60", quality: "hd2160", isPlayable: true, … }
2: Object { qualityLabel: "1440p60", quality: "hd1440", isPlayable: true, … }
3: Object { qualityLabel: "1080p60", quality: "hd1080", isPlayable: true, … }
4: Object { qualityLabel: "720p60", quality: "hd720", isPlayable: true, … }
5: Object { qualityLabel: "480p", quality: "large", isPlayable: true, … }
6: Object { qualityLabel: "360p", quality: "medium", isPlayable: true, … }
7: Object { qualityLabel: "240p", quality: "small", isPlayable: true, … }
8: Object { qualityLabel: "144p", quality: "tiny", isPlayable: true, … }
@insin insin added the enhancement New feature or request label Aug 6, 2024
@insin insin pinned this issue Aug 6, 2024
@realAzazello
Copy link

realAzazello commented Oct 8, 2024

Bogudan's userscript Youtube polymer engine fixes has that option: set video quality (disables auto quality).

The setting stays sticky between vids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants