
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?