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

proxying m3u8 links #1

Open
lastraum opened this issue Apr 27, 2021 · 4 comments
Open

proxying m3u8 links #1

lastraum opened this issue Apr 27, 2021 · 4 comments

Comments

@lastraum
Copy link

Hi there, so this proxy works for static files, but i'd like to proxy in an external m3u8 link since it doesn't have the correct headers for CORS.

Is this possible with your index.js or is there a mod to returning a stream data?

@ryanking13
Copy link
Owner

Hello, can you give me a more detailed explanation of your problem?

@lastraum
Copy link
Author

So following your example, proxying a static website is fine and works perfectly. But if i want to proxy an m3u8 link (https://liveproduseast.global.ssl.fastly.net/btv/desktop/us_live.m3u8), the index.js no longer works. Are there additional / separate headers to add to the response object for an m3u8 link specifically? This proxy I'm creating will strictly be used for this type of link fyi

@ryanking13
Copy link
Owner

ryanking13 commented Apr 28, 2021

@lastraum

I skimmed through how m3u8 and HLS works, and I don't think it is a matter of headers.

The video player library you use to play streaming first parses the m3u8 file and sends subsequent requests to get stream files.
So, you need to modify the source of the video player library in order to change every request it makes to go through the CORS proxy.

@lastraum
Copy link
Author

Ok interesting. I was doing some reading too and saw where people were determining if the request was .m3u8 or if it was a .ts and handling the request accordingly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants