Looking for more extensive HLS error reporting

I am attempting to playback live streams with video.js 7 and the built-in VHS plugin. All works fine, but when the stream ends, the “ended” player event doesn’t fire. Eventually, 404 errors start to show on the console because the manifest is deleted, but nothing propagates to the player and the “error” event.

Is there some way to get greater granularity of what is happening in the hls engine? The “hls.js” client, for example, returns significant events like “buffer stalled” and “level load” errors. These message help assess the health of the live stream and can also be used to determine if the stream has ended. It would be great if there was a way to get this level of detail from VHS.

I know I can use video.js 7 with another plugin that loads the hls.js client. But the one that also exposes hls.js events – https://github.com/Peer5/videojs-contrib-hls.js – uses a very old version of hls.js and appears to be currently unmonitored.

Thank you.

2 thoughts on “Looking for more extensive HLS error reporting

  1. Hello. Still looking for a way to detect the end of a live HLS stream. I noticed there are VHS “usage events” that could convey the information that the manifest is no longer being updated and eventually disappears (resulting in xhr 404/504 errors). But I can’t get any of these events to fire. Is it possible that I’m not using them correctly? Here is a section of my code:

    video.ready(function() {
      var player = this;
      player.tech().hls.on('hls-unknown-waiting', function() {
        console.log('hls-unknown-waiting');
      });
      player.tech().hls.on('hls-live-resync', function() {
        console.log('hls-live-resync');
      });
      player.on('hls-error-reload-initialized', function() {
        console.log('hls-error-reload-initialized');
      });
      player.on('hls-error-reload', function() {
        console.log('hls-error-reload');
      });
    });
    
  2. The VHS (videojs-http-streaming) plugin has an undocumented event called “retryplaylist” that seems to correspond to 404/504 responses received once the live stream manifest has been deleted. Attach the event to the HLS tech, as follows:

          player.tech().on('retryplaylist', () => {
            console.log('retryplaylist');
             (and do something)
          });