Resolve subtitles through base_url#733
Conversation
|
@kekulta Thank you, this is incredible work. If I'm understanding the change correctly, the POT is cached in session storage and can be decoded. I think this approach will work great. I only have a few things to add before you clean things up:
Some other minor comments which I think you're already aware of:
|
|
One other thing - the original idea to support YT's machine-translated tracks will need the user to specify their target language somewhere. Naturally, I think this would be another setting. But let me know if you had other ideas. |
|
Thanks again for this contribution. I used your PR as a starting point to integrate POT decoding as a fallback method for fetching YT subs. In particular, the POT seems to provide the only reliable way to fetch subs for members-only videos. |
This PR is inspired by #609.
The original PR appears outdated and unlikely to be completed, so here's a new implementation.
With huge help from the YouTube.js maintainer, I figured out how to retrieve poToken and resolve subtitles directly.
I hardcoded
&tlang=enrn just to check that auto-translation works. If this approach is ok, I will clean it up and make second PR with support to auto-translated subs.This is a draft (very messy!). If we agree this approach works, I'll clean it up.
I'm not a web developer, so this is essentially my first interaction with TypeScript.
I hope I didn't reinvent the wheel here 😄