I'm trying to create an online iptv player so I can play my personal iptv list without installing any app or software. To do so, I'm using React as framework and I'm stuck because of some problem. Apparently my iptv provider gave me a list of this type:
#EXTINF:-1 tvg-id="Canale5.it" tvg-name="CANALE 5 HD" tvg- http://iptv.provider.cloudns.nz:8080/username/password/402696 #EXTINF:-1 tvg-id="Canale5.it" tvg-name="CANALE 5 SD" tvg- http://iptv.provider.cloudns.nz:8080/username/password/402695
In the list there are theese urls that doesn't take you directly to the stream. In fact, if I try to analyze the traffic when I open the url of a channel I can see that the first GET request makes my browser do a redirect (I get a 302 response with a link to the actual resourse). The actual url to play the channel gives me a 200 http response and my browser continue loading (probably because it is streaming the channel).
Here is the first HTTP GET request. Here is the second HTTP GET request.
To start developing my website I decided to first check if the player is able to play the stream. So I wrote this piece of code in my React project
<ReactPlayer className="player-wrapper" url={channelUrl} controls playing width='100%' height='100%'/>
In my browser (updated firefox), this is shown This is the first response Firefox redirection response This is the second response
You can see that the ReactPlayer is unable to play the stream. Why? What could be wrong?