Quality API on JWPlayer 6
I've been working with JWPlayer for days developing a simple analytics plugin for the newer 6 version.
The plugin logic relies on player events which is enough for us.
All is working pretty good as expected.
But the issue comes when I try to get the current bitrate of the video asset that is playing.
So in Quality API section I see available:
bc.. jwplayer().getQualityLevels() -> array of level objects
jwplayer().getCurrentQuality() -> current selected level of the array
And as the documentation says I should retrieve the bitrate from the level object like:
bc.. var levels = jwplayer().getQualityLevels();
var currentBitrate = levels[jwplayer().getCurrentQuality()].bitrate;
But unfortunatelly I get the current index, the array of levels but inside every level object I'm only able to see the attribute
No bitrate or other metadata seems to be returned.
I've also tried to force Flash player to load with
bc.. primary: "flash"
on the player setup but the same results are shown.
So I wonder how to get the current video bitrate for sending to our analytics account using a plugin.
Is this related with the video encoding?
In which situations I will recieve the bitrate on the level object?
Is there any other workaround for calculating the average bitrate (or near value) for the current playback?