-
Notifications
You must be signed in to change notification settings - Fork 35
Exposing all hls.js events as api events leads to memory leak #29
Comments
With the propagation of hls.js to be triggered as flowplayer events private memory in chrome://memory-redirect/ can exceed 1GB. @nnarhinen, @mangui - thoughts? |
We still must expose |
MP4 highest resolution of same movie: 277,144k in Flowplayer. |
The memory situation is not as critical with dash.js as with hls.js flowplayer/flowplayer-hlsjs#29 but it seems a good idea to avoid event potential overload trouble.
In our project we use flowplayer-hlsjs when streaming video. Recently we found memory leak bug, which is happened when stream is playing some amount of time. These leaks are happened only when Hls.Events.FRAG_PARSING_DATA event is exposed in listeners array of hlsjs configuration. One of the workarounds, that eliminates these memory leaks, is to reset event data, before we triggering this event on flowplayer, but in this case we lost all data of FRAG_PARSING_DATA event. P.S. It takes place in all web-browsers, except EDGE. |
@criozen can you try listening to the event directly and see whether that alleviates the problem, e.g.: flowplayer(containter, {
// player configuration goes here
// do not register the hls.js event
}).on("ready", function (e, api) {
if (api.engine.hlsjs) {
api.engine.hlsjs.on(Hls.Events.FRAG_PARSING_DATA, function (e, data) {
console.info(data);
});
}
}); Also make sure that you are using the latest version of the plugin. |
@blacktrash Listening directly from hls.js eliminate this issue in Chrome and Internet Explorer, but not in Firefox. |
@criozen - without an actual sample page I can't know what you're actually doing in the event handler.
|
And this does not happen in a pure hls.js setup w/o Flowplayer? |
Turns out that problem was not only with FRAG_PARSING_DATA event, but also with FRAG_LOADED event. After i start to listen both of this events directly from hls.js, memory leaks in all browsers are gone. |
@criozen - I have lost track now: when you listen to both events, the issue is gone, but if you listen to FRAG_PARSING_DATA alone it's still there? |
Sorry about this, but I think they've removed the memory tab from chrome. Can you comment as to whether or not this issue may be responsible for memory behavior like this? Basically i see an acceptable Javascript heap but overall memory consumption balloons out of control. Specifically, i've got two players rendering the same live video on a page. |
@josh-sachs - chrome://system/ |
Triggering player events whenever a hls.js event is fired increases private memory consumption steadily.
See: https://flowplayer.org/forum/#!/setup:buffering-preloader-always
The text was updated successfully, but these errors were encountered: