MyBB Community Forums

Full Version: Embed an HLS Stream
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello
I need MyCode to play m3u8 url in my forum . the following code works fine in the html file

<video id="video" width="800" height="600" controls autoplay 
class="videoCentered"></video>
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.js"></script>
<script>
  if(Hls.isSupported()) {
    var video = document.getElementById('video');
    var  hls = new Hls({ autoStartLoad:false });
    hls.loadSource('https://nn.geo.joj.sk/live/hls/jojplus-360.m3u8');
    hls.attachMedia(video);
	hls.startLoad(1);
    hls.on(Hls.Events.MANIFEST_PARSED,function() {
	  hls.startLoad(20);
      video.play();
  });
 }
</script>

Can anyone convert this code to MyCode?
In your code https://nn.geo.joj.sk/live/hls/jojplus-360.m3u8 is the source file, is that suppose to be any file from any server?
(01-17-2019, 08:45 PM)Omar G. Wrote: [ -> ]In your code https://nn.geo.joj.sk/live/hls/jojplus-360.m3u8 is the source file, is that suppose to be any file from any server?

That is the example
That suppose to be any file from any server Heart
I'm waiting for your help  Heart Heart
(01-19-2019, 05:36 PM)DJMOKHTAR Wrote: [ -> ]I'm waiting for your help  Heart Heart

The following might work:
https://community.mybb.com/thread-221672.html
(01-25-2019, 08:37 AM)Omar G. Wrote: [ -> ]
(01-19-2019, 05:36 PM)DJMOKHTAR Wrote: [ -> ]I'm waiting for your help  Heart Heart

The following might work:
https://community.mybb.com/thread-221672.html

I tested but unfortunately did not play
[attachment=41486]
(01-25-2019, 12:54 PM)DJMOKHTAR Wrote: [ -> ]I tested but unfortunately did not play

If you try the Test Value the HTML Result matches that of your code.
(01-25-2019, 08:38 PM)Omar G. Wrote: [ -> ]
(01-25-2019, 12:54 PM)DJMOKHTAR Wrote: [ -> ]I tested but unfortunately did not play

If you try the Test Value the HTML Result matches that of your code.

It works well in the admin panel but it does not work on the forum
I tested even with a fresh version of MyBB on localhost .
Why doesn't it work? I need more details than what you are giving.
Pages: 1 2