Reputation: 700
I am trying to get analytics on hls.js from my video segments. I am looking for the size of the video segments and what time the video segments go over the network.
I am currently using the HLS events with not much luck:
this.hls.on(HLS.Events.BUFFER_APPENDING, (event, data) => {
console.log(data);
console.log('segment added to buffer');
});
I've tried BUFFER_APPENDED, BUFFER_APPENDING, FRAG_CHANGED, without much luck getting the info I want.
Upvotes: 1
Views: 2598
Reputation: 26075
FRAG_BUFFERED
or LEVEL_LOADED
event should have stat information you need.
Demo folder in repository has good level of stats collection you might be able to use it for collecting stats: https://github.com/video-dev/hls.js/tree/master/demo
Upvotes: 2