You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 formatdoes 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?
The text was updated successfully, but these errors were encountered:
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?The text was updated successfully, but these errors were encountered: