![](https://secure.gravatar.com/avatar/22d206c566d8d59a7badfba00f21a2e8?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
onBufferChange on chrome is buggy
onBufferChange on chrome doesn't work properlly.
My code:
jwplayer('video-player').setup({
file: 'video.mp4?t=' + Math.random(),
width: '500px',
events:{
onBufferChange: function(e) {
console.log(e.bufferPercent);
}
}
});
Note that every time this runs, the video URL is different so I don't use a possibily cached version of the video.
On firefox I get many log events in the console:
11
18
21
32
39
46
50
60
71
74
81
88
99
100
On chrome I only get:
100
And the worst part about jwplayer in chrome is that I'm getting this 100 at a very early stage of the prebuffering. By looking at the network tab in dev tools, I'm getting it when the first part of the mp4 finishes (with a 206 partial content response code) which is very very early. After that another part (or more parts) are downloaded, but the onBufferChange with "100" has already fired.
Thus, in Chrome, I don't really know when the video file has finished buffering.
Is this fixable?