# Problem with hls m3u8 files not playing in html5 video tag

**URL:** <https://forum.webostv.developer.lge.com/t/problem-with-hls-m3u8-files-not-playing-in-html5-video-tag/2478>\
**Category:** Web App Development\
**Created:** [March 23, 2023, 9:48am UTC](https://forum.webostv.developer.lge.com/t/problem-with-hls-m3u8-files-not-playing-in-html5-video-tag/2478 "2023-03-23T09:48:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user1790](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@user1790](https://forum.webostv.developer.lge.com/u/user1790)\
**Post date:** [March 23, 2023, 9:48am UTC](https://forum.webostv.developer.lge.com/t/problem-with-hls-m3u8-files-not-playing-in-html5-video-tag/2478/1 "2023-03-23T09:48:43Z")

</div>

I am trying to play m3u8 file with html5 video tag using hls.js but it is not playing only on TV.  
To be precise, sometimes it is played after a long wait.

Plays fine on the web.

How can I play “m3u8” files well on LG WEB OS TV?  
“mp4” plays fine.

I’ve read the document below, but I don’t quite understand. Are you saying to create a new m3u8 file itself?  
[https://webostv.developer.lge.com/faq/2014-10-30-http-live-streaming-troubleshooting](https://webostv.developer.lge.com/faq/2014-10-30-http-live-streaming-troubleshooting)

```
    const video = videoRef.current
    const hls = new Hls()
    if (Hls.isSupported()) {
        hls.loadSource(item.videoUrl)
        hls.attachMedia(video)
    } else if (video.canPlayType('application/vnd.apple.mpegurl')) {
        video.src = item.videoUrl
    }

             <video
                className="video focus-control"
                tabIndex={0}
                ref={videoRef}
                width="100%"
                height="100%"
                preload="auto"
                loop
                muted={true}
                onPlaying={onPlay}
                onClick={handleClick}
                onKeyDown={handleClick}
                controls
            >

```

---

<div class="post-metadata">

**Author:** ![narae0.kim](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@narae0.kim](https://forum.webostv.developer.lge.com/u/narae0.kim)\
**Post date:** [March 24, 2023, 12:10am UTC](https://forum.webostv.developer.lge.com/t/problem-with-hls-m3u8-files-not-playing-in-html5-video-tag/2478/2 "2023-03-24T00:10:02Z")

</div>

Please check [Streaming Protocol and DRM](https://webostv.developer.lge.com/develop/specifications/streaming-protocol-drm) first. Some HLS tags are not supported in the webOS TV, and most issues are caused by the tags. Thank you.
