Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Can't release memory in Chrome browser


What I'm doing:
- call setup with my options
- provide callbacks to some API events (eg. onReady, onPlay, onComplete)
- play video
- at completion of video, I call remove()

No matter what variation and or tweak I do, I do not see memory in Chrome ever come down from after calling remove(). In using Chromes Profiling tools, I do not have any detached DOM nodes after the removal happens. I do however see some leftover objects pertaining to jwplayer.

Any help is appreciated!!

5 Community Answers

Andrew

JW Player Support Agent  
0 rated :

Do you have a link to where you’re setting this up?

stuart.lees

User  
0 rated :

No, unfortunately I'm not able to provide a link to the files at this time.

Andrew

JW Player Support Agent  
0 rated :

Hi Stuart,

Please send over a test page that we can use to examine the issue. Again, we’ll need to narrow down some specifics to replicate the behavior you’ve mentioned.

stuart.lees

User  
0 rated :

Hi Andrew,

I will try and put together a smaller text example but may not be able to provide one soon. In the meantime, I will elaborate a bit more on what I'm trying to achieve and what's been happening.

The issue I've been facing in general with HTML5 video and why I moved to using JW Player is that I have a requirement for displaying video inside a "widget" to which there will be multiple instances of this widget and each one will play its video and then cycle to the next widget, to continuously play video in a rotation, indefinitely. It needs to run for as long as it needs to (days, weeks, months, etc - it's digital signage). This is within Chrome browser. I have encountered an issue of steady memory incline and over an extended period of time, Chrome crashes or the videos stop playing, due to memory overload.

I started using JW Player so that I could leverage certain functionality as well as make use of the remove() method so that all the DOM nodes and listeners would be removed and cleaned up, in hopes of releasing memory and prevent the steady incline.

Unfortunately, this hasn't worked out. Although I do see some memory drop when I analyze after a remove() call, it still doesn't prevent a steady incline in memory over an extended period of time. I think this may be due to jwplayer objects leaking and preventing garbage collection (from doing JS Heap profiling).

One workaround I'm doing now is to do all the importing, setup and management of the jwplayer instance within an iframe and then destroy the iframe when video has completed, thus ensuring that everything is garbage collected.

Can you provide any insight into these memory issues and best recommendations?

Andrew

JW Player Support Agent  
0 rated :

Hi Stuart,

Quite candidly, running a video player for weeks or months at a time is certainly an atypical use case for the player. That being said, again, it would help greatly if we had some sort of test to look at. This would help to know what kind of stream or file was being used, as well as the version of the player.

This question has received the maximum number of answers.