Piped/src/components
Andry Yosua 5b4fb38c85
Allow set subtitle language from url parameter (#2935)
* allow set subtitle language from url parameter

As user,
I want to set subtitles language from url parameters,
So i do not need to subtitle language each time i switch instances

for now you can set `subtitles=xx` (example: `subtitles=en`) on url
parameter to set video subtitle language.

full url example: https://piped.video/watch?v=6stlCkUDG_s&subtitles=en

i choose query `subtitles` so it's compatible with [invidious url
parameter](https://docs.invidious.io/url-parameters/)

this is especially useful when you have addons like redirector

improvement over https://github.com/TeamPiped/Piped/issues/2669 and
https://github.com/TeamPiped/Piped/issues/223

* cleaning code

* looks simpler and more self-explaining

fix suggested on
https://github.com/TeamPiped/Piped/pull/2937#discussion_r1325072807
2023-09-14 08:51:50 +02:00
..
2022-02-10 15:03:33 +00:00