in web/reactplayer/src/sdk/QoSSDK.js [266:296]
step = function(playbackAttr, packageType, time) {
var metericName = "STEP";
let newAvgBitrate = 0;
if(playbackAttr["AVERAGE-BANDWIDTH"]){
newAvgBitrate = parseInt(playbackAttr["AVERAGE-BANDWIDTH"])
}
else{
newAvgBitrate = 0;
}
// let newAvgBitrate = parseInt(playbackAttr["AVERAGE-BANDWIDTH"]);
let direction;
currentVideo.packageType = packageType.toUpperCase();
//if current bitrate is 0, then its the step down operation
//at the start of play
if(currentVideo.avgBitrate === 0){
direction = 'DOWN';
}
else{
direction = (currentVideo.avgBitrate > newAvgBitrate) ? 'DOWN' : 'UP';
}
connectionType = getConnectionType();
var metricValue = setMetricValue(metericName, [currentVideo.currentTime, currentVideo.avgBitrate, newAvgBitrate, direction, currentVideo.packageType, currentVideo.resolution, currentVideo.frameRate, connectionType.type]);
// playbackAttr["FRAME-RATE"]
var calculatedMetric = Metric(metericName, metricValue);
//set the new Avg Bitrate being streamed
currentVideo.avgBitrate = parseInt(newAvgBitrate);
displayMetrics("Bitrate Step " + direction + " at :", currentVideo.currentTime);
return sendToAWS(calculatedMetric);
},