Closed Artrix9095 closed 2 years ago
quick thoughts:
PS: if the video player webpage (that uses hls.js) is hosted on https, then the problem is most likely that the proxy server is currently only running http.. and browser security policy won't allow requesting insecure resources. If that is the case, then you could either load your webpage with http, or run your proxy server with https.. or simply use a web browser that doesn't enforce this policy.
PPS: I'm a little confused by one thing.. could you please clarify..
Are you running your instance of the proxy server at:
127.0.0.1:8000
or127.0.0.8:8000
I see both hosts mentioned in your description.. so I'm wondering if that's the actual cause for your problem?
Hi thank you for the zippy responses, Its 127.0.0.8
here is one of the urls that are trying to be requested...
http://127.0.0.8:8000/aHR0cHM6Ly9jYnNuLXVzLmNic25zdHJlYW0uY2JzbmV3cy5jb20vb3V0L3YxLzU1YTg2NDhlOGYxMzRlODJhNDcwZjgzZDU2MmRlZWNhL21hc3Rlcl8xMS5tM3U4.m3u8
I just noticed... there seems to be some inconsistency between 127.0.0.1 and 127.0.0.8... in the initial request it goes to 127.0.0.1, but in all the others it goes to 127.0.0.8. When I ran the proxy, I specified that the hostname should be 127.0.0.8 which makes this very confusing.
dumb question.. but does 127.0.0.8
also resolve to the machine running the hls proxy?
Incase your wondering, here is a snippet of my react component
const videoProps = {
controls: true,
width: '100%',
height: '100%',
playerRef: videoRef,
src: `${proxyUrl}/${btoa('https://www.cbsnews.com/common/video/cbsn_header_prod.m3u8')}.m3u8`,
hlsConfig: {
maxLoadingDelay: 4,
minAutoBitrate: 0,
lowLatencyMode: true,
xhrSetup: console.log,
},
};
return (
<>
<Player {...videoProps} />
</>
);
I don't think it does, if i switch the proxy url to 128.0.0.8 the request just fail, while if its 128.0.0.1 the initial requests work fine
But I've noticed that the child requests are all using 127.0.0.8 instead of 127.0.0.1
I'm dumb if you see 128 I mean 127
I think I just got it to work, you have to use localhost when using the proxy locally,
npm start --host "localhost"
well.. the only purpose for the --host
cli option is to redirect the internal URL back through the proxy.
since you're currently running the proxy server on localhost.. you can just use: --host 127.0.0.1
..which is the same as: --host localhost
yep.. you beat me to the "comment" button :) ..you got it
Thank you for the fast responses man, you helped me realize the problem, when running with --host 127.0.0.1, for some reason it doesn't work when I host it locally...
no worries..
out of curiousity.. where did the IP 127.0.0.8
come from?
was it just from a typo on the command line?: --host 127.0.0.8
..or did the proxy server (incorrectly) determine that this was the IP for one of your network interfaces all on its own?
Hi, when working with your proxy I've come across a issue...
Lets use the playlist from #8 for an example
So lets say I were to try to get
https://www.cbsnews.com/common/video/cbsn_header_prod.m3u8
from CBS news through the proxy... The URL I get is:http://127.0.0.1:8000/aHR0cHM6Ly93d3cuY2JzbmV3cy5jb20vY29tbW9uL3ZpZGVvL2Nic25faGVhZGVyX3Byb2QubTN1OA==.m3u8
Now when fetching this... I get the response back
This all works fine... but, when trying to request any of the other URLs inside the playlist I just receive connection timeouts
I've tried turning on debugging mode
3
, and received this in my console:Do you have any idea why this is happening? Does it have something to do with the fact that I'm using hls.js? Or is this an internal error? Or maybe its just me. Any help is appreciated, thanks.