![](https://secure.gravatar.com/avatar/6fafddd9156b051d16c5d44a2714b069?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Quality metrics
I've been working with JWPlayer API and I want to get download video bitrate and current buffer level in seconds for dash content. I use the following functions:
setInterval(updateStats, 500);
function updateStats(){
var qualityLevels = jwplayer().getQualityLevels()
var visualQuality = jwplayer().getVisualQuality();
var currentQuality = jwplayer().getCurrentQuality();
visualBitrate = qualityLevels[currentQuality].bitrate;
console.log("visualBitrate = ", visualBitrate);
}
But 'currentQuality' is always equals 0 and 'visualBitrate' = undefined. getCurrentQuality() should returns the index of the currently active quality level. Moreover qualityLevels = jwplayer().getQualityLevels() doen't have property 'bitrate'.
qualityLevels includes only: contentType, label and level_id
How can I get <download video bitrate value> and <current buffer level value> using JW Player API? What is wrong?
Thank you!