0

I have an application that loads an iframe that contains a player that streams a m3u8 video stream.

<iframe src="https://MY_SITE//IFRAME" width="100%" height="100%" allowFullScreen="" allow="autoplay; encrypted-media; picture-in-picture"/>

It works fine on WebOS 22+, however the same app would randomly crash on WebOS 6. I tried testing with YouTube iframes and they crash as well.

How can I play a video stream on WebOS stably?

Lizozom
  • 2,161
  • 2
  • 21
  • 38

1 Answers1

0

I ended up fetching the underlaying stream and using a streaming player, as suggested here. The solution is stable on WebOS 6+.

<html>
<head>
    <script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
</head>
<body>
    <script>
    const el = document.createElement('video');
    el.id = 'player';
    document.body.appendChild(el);


    if( Hls.isSupported() ) {
        const oAvPlayer = document.getElementById('player');
        const oHlsApi = new Hls();
        oHlsApi.subtitleDisplay = false;
        oHlsApi.attachMedia(oAvPlayer);

        // Play channel
        oHlsApi.loadSource('https://rakuten-spotlight-3-eu.rakuten.wurl.tv/playlist.m3u8');
        oHlsApi.startLoad();
    }
    </script>
</body>
</html>
Lizozom
  • 2,161
  • 2
  • 21
  • 38