Broadcasters check Referer and User-Agent before handing over an HLS playlist — and JS can't set either, since Referer is a forbidden header name. Many endpoints send no CORS header either.
PT TV Tuner puts a small Node service on the other side: it fetches the playlist with the expected headers, rewrites every child URI back through itself, and passes segments through. The page only ever talks to its own origin. 32 channels as JSON.
How I built a browser based Portuguese TV player
YouTube