最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - hls.js - how to subscribe to any event - Stack Overflow

programmeradmin0浏览0评论

First time I play a playlist, I keep getting bufferStalledError.

I can detect this error, however, if I resolve this error then a jump or skip in the video play back occurs and it stops occurring.

However, if i ignore it then it will play without a noticable interruption and the video keeps playing. But this error will continue to be raised but without any noticable issues.

However, at times, the same error will result in an overflow and hls.js won't be able to recover automatically, and no further errors are reported after such a failure than the last bufferStalled error.

I have to restart the video through destroy and attach again resuming the play functionality hls.js is unable to do automatically or through recoverMediaErrors().

The only problem is that I am unable to subscribe to an event that says that the video is playing, or stuck. After a bufferStalledMediaError hls.js will recover it automatically without a glitch, but sometimes it fails to do so. In both cases no more errors are reported.

But is there maybe another event reported that says it is playing that is not an error report?

Is there an hls.on(Hls.Events.ALL, ... ) event ?

What about setting up a TimeLineController? It's not documented.

Reference: .js/blob/master/API.md

First time I play a playlist, I keep getting bufferStalledError.

I can detect this error, however, if I resolve this error then a jump or skip in the video play back occurs and it stops occurring.

However, if i ignore it then it will play without a noticable interruption and the video keeps playing. But this error will continue to be raised but without any noticable issues.

However, at times, the same error will result in an overflow and hls.js won't be able to recover automatically, and no further errors are reported after such a failure than the last bufferStalled error.

I have to restart the video through destroy and attach again resuming the play functionality hls.js is unable to do automatically or through recoverMediaErrors().

The only problem is that I am unable to subscribe to an event that says that the video is playing, or stuck. After a bufferStalledMediaError hls.js will recover it automatically without a glitch, but sometimes it fails to do so. In both cases no more errors are reported.

But is there maybe another event reported that says it is playing that is not an error report?

Is there an hls.on(Hls.Events.ALL, ... ) event ?

What about setting up a TimeLineController? It's not documented.

Reference: https://github./dailymotion/hls.js/blob/master/API.md

Share Improve this question asked Mar 31, 2016 at 5:28 mjsmjs 22.4k32 gold badges133 silver badges220 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

I don't think there is a built in way to listen to all events, but you could always just subscribe to every event:

Object.keys(Hls.Events).forEach(function (e) {
    _hlsInstance.on(Hls.Events[e], console.info.bind(console));
});
发布评论

评论列表(0)

  1. 暂无评论