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

The video embed doesn't support starting times #27

Open
dcabo opened this issue Oct 6, 2019 · 0 comments
Open

The video embed doesn't support starting times #27

dcabo opened this issue Oct 6, 2019 · 0 comments
Labels

Comments

@dcabo
Copy link
Member

dcabo commented Oct 6, 2019

We'd like to embed a video starting from a given starting position. Unfortunately, adding the time at the end of the URL, like this, doesn't work. Going to the main page of the programme with a similar format does work, which is what we use to jump into a particular sentence.

I've spent some time trying to understand how the RTVE video works, to see if we can embed our own player, but it's really complicated. They seem to use a standard VideoJS player, but the URL to play is not easy to get. Looking at network requests, it's a long m3u8 URL, like this. You can play it in a generic player online and it works fine.

But how to get that m3u8 URL? It's not in the HTML, and it's not in any of the XHR responses either. This is where the magic happens, and I went to look at youtube-dl, which supports RTVE pages, to understand it. The site asks for a PNG image (like this one), but this is no common image: it's Base64 encoded. Once decoded, there seems to be an additional decryption part going on, and then you get URL.

youtube-dl is in Python, so we can't use it directly from our site. We could copy the functionality or set up an API. We could then look into HLS/m3u8 players to embed stuff. All this just to start from a given time. Considering that the alternative is to just take the user to the RTVE site, which works fine, I really don't think this is worth the effort at this point. The question is actually: given the limited functionality at the moment, do we even want to show this?

dcabo added a commit that referenced this issue Oct 6, 2019
@dcabo dcabo added the V2 label Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant