Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Add app=desktop param to all youtube.com requests #31

Closed zakharvoit closed 1 year ago

zakharvoit commented 1 year ago

Add a YoutubeURLLoaderRequestInterceptor class which implements logic of ensuring that all youtube requests have the "app=desktop" parameter present. This allows Wolvic browser to play 360 youtube videos correctly.

svillar commented 1 year ago

Naive question, isn't there any other way to add a parameter to the URL without having to add a redirect?

Looks like a lot of code for such a "simple" thing

Answering myself, after checking the navigation documentation it looks like this is indeed the way to go.

Actually in Gecko we do also do a redirect to modify the URL, it's just it's done in JS in an extension in 10 lines of code.

zakharvoit commented 1 year ago

Naive question, isn't there any other way to add a parameter to the URL without having to add a redirect? Looks like a lot of code for such a "simple" thing

Answering myself, after checking the navigation documentation it looks like this is indeed the way to go.

Actually in Gecko we do also do a redirect to modify the URL, it's just it's done in JS in an extension in 10 lines of code.

I couldn't find a simpler way without supporting extensions, unfortunately. It's the same approach chromium uses to do an automatic http -> https upgrade.