question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey There- Is there a way to get a handle to the hlsjs events that get fired when playing a M3U8?

We are looking to get the #EXT-X-PROGRAM-DATE-TIME item from the playlist. And seem to be able to get them from the “FRAG_LOADED” event.

Having a hard time seeing where to get them from the-

 const hlsInstance = this.player.getInternalPlayer();

thanks
MJD

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
cookpetecommented, Jul 5, 2019

Note that you can now use

const hlsInstance = this.player.getInternalPlayer('hls')

instead of

const hlsInstance = this.player.player.player.hls
2reactions
MDrookercommented, May 4, 2018

@CookPete- Worked like a champ!
Seeing the events flow.

BTW- In your sample app- If you do use this syntax-

onError={(e, data) => this.onError(e, data)}

the data return from HLS gives you the actual error from the library. That may help someone else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HLS.js v1 API - GitHub
HLS.js is a JavaScript library that plays HLS in browsers with support for MSE. ... attachMedia(video); // MEDIA_ATTACHED event is fired by hls...
Read more >
src/events.js | hls.js
JavaScript HLS client using MediaSourceExtension. ... src/events.js ... attaching to media element - data: { media }; MEDIA_ATTACHING: 'hlsMediaAttaching', ...
Read more >
Home - hls.js demo - Netlify
HLS.js is a JavaScript library that implements an HTTP Live Streaming client. It relies on HTML5 video and MediaSource Extensions for playback.
Read more >
hls.js - how to subscribe to any event - Stack Overflow
I don't think there is a built in way to listen to all events, but you could always just subscribe to every event:...
Read more >
Hls.js - Streamroot Documentation
This article details how to use CDN Mesh delivery with hls.js, the open-source and most widely used HLS player in ... attachMedia(video); hls.on(Hls.Events....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found