1

I am developing an app for SmartTV platform webOS by LG. I have to play video with html5 tag. The videos are stored in playlist files (m3u8), so I have links to them. But they are protected by Basic Authentication. I am using a link like that: https://username:password@domain.name/file.m3u8 When I embed this link to tag it doesn`t play the stream, although I am using an attribute crossorigin="use-credentials" in tag.

<video id="videoplayer" width="480" height="320" crossorigin="use-credentials" autoplay>
 <source id="source" src="https://username:password@domain.name/file.m3u8"></source>
</video>
  • Do you get any errors when calling the URL and have you tried with a none protected file to make sure the rest of the code works? – Steve Apr 11 '18 at 07:45
  • @Steve, yes, I tried a none protected file and it works. I also have a Tizen Smart TV app, where it works with protected file, but in Tizen I use API, however in LG I have to use video tag. – Sergey Kolontaevsky Apr 11 '18 at 07:51
  • i have same error, which sound like: "Cross origin resource sharing error MissingAllow OriginHeader". As i undestood, this is require external server returns HTTP Header "Access-Control-Allow-Origin". if i dont mistake, CORS errors generate by browsers, and for develop purposes we can disable this functionality, but we cant disable it for our customers. I see fast solution - using the server-side proxying based on nodejs which not be generate CORS errors – hwak Jan 29 '21 at 11:17

0 Answers0