简体   繁体   中英

HLS.js get video segment info

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM