-
Notifications
You must be signed in to change notification settings - Fork 218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything we can do to bump up the resolution by default? Or is that on the server side?
We should be able to do that from JS. I'm looking into it. |
I was able to get the Youtube Player API instance from the WebExtension,and check all the available qualities. But setPlaybackQuality didn't work. I found this in the docs...
So unless we can inject a touch event and fake the click to the quality selector, it's not going to be easy to change the quality |
9a19e35
to
946bd57
Compare
@MortimerGoro, do we know what metrics they are using to select the lowest resolution? I assume this doesn’t happen on desktop? |
I think they use UA and window size, but not sure if they use more metrics. @cvan may know better |
thanks! reviewing rn. revisiting my old notes, I'm quite certain we can make this work. P.S. thanks for beating me to the punch in writing this patch. 😍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! the CSS style via the content script does in fact remove the silly 360 warning 👍
I did some investigating yesterday and here are my conclusions:
https://gist.github.com/cvan/6f8196c1e8fce2165eb6847eba89f2c7
I was able to add these lines to your main.js
content script, and YouTube 360 videos started playing at max quality! 😄 🎉
// Open the `Settings` menu.
document.querySelector('ytp-settings-button, .ytp-settings-button').click();
// Select the `Quality` sub-menu.
document.querySelector('ytp-settings-menu ytp-menuitem:last-child, .ytp-settings-menu .ytp-menuitem:last-child').click();
// Select the best `Quality`.
document.querySelector('ytp-quality-menu ytp-menuitem:first-child, .ytp-quality-menu .ytp-menuitem:first-child').click();
thanks for taking the initiative with this one. I'd be happy to help follow follow-up issues and write patches for the two recommendations I made in my doc.
thanks, @MortimerGoro 👍
Good trick to change the quality @cvan! I'm going to merge this, but please create a different PR adding all the quality change code. Maybe is better to select something like 1440p by default instead of the maximum one (until we have 4K performance issues sorted out) |
…, `quality=` query-string parameter) (fixes issue #1051) (#1052) * tidy up YouTube WebCompat WebExtension (follow up to PR #1047) * automatically upgrade default YouTube video playback quality to HD 1440p (fixes issue #1051); hide `Full screen is unavailable` message (fixes issue #1056) - or via `vq=`/`query=` query-string parameter in URLs for youtube.com and youtube-nocookie.com * Fix SyntaxError * Update to wait until player has resolutions available
was added in 1.1.3: https://github.com/MozillaReality/FirefoxReality/releases/tag/1.1.3e |
Note: When https://bugzilla.mozilla.org/show_bug.cgi?id=1511177 lands we probably can remove the viewport change injection. That should also avoid the layout change.