Skip to content

Commit

Permalink
Refactoring (#2898)
Browse files Browse the repository at this point in the history
Refactor DashAdapter and DashManifestModel
  • Loading branch information
nicosang authored and epiclabsDASH committed Feb 13, 2019
1 parent 5a67489 commit 4ee40ce
Show file tree
Hide file tree
Showing 65 changed files with 1,119 additions and 1,116 deletions.
5 changes: 3 additions & 2 deletions samples/dash-if-reference-player/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,14 +738,15 @@ app.controller('DashController', function ($scope, sources, contributors, dashif
function updateMetrics(type) {
var metrics = $scope.player.getMetricsFor(type);
var dashMetrics = $scope.player.getDashMetrics();
var dashAdapter = $scope.player.getDashAdapter();

if (metrics && dashMetrics && $scope.streamInfo) {
var periodIdx = $scope.streamInfo.index;
var repSwitch = dashMetrics.getCurrentRepresentationSwitch(metrics);
var bufferLevel = dashMetrics.getCurrentBufferLevel(metrics);
var maxIndex = dashMetrics.getMaxIndexForBufferType(type, periodIdx);
var maxIndex = dashAdapter.getMaxIndexForBufferType(type, periodIdx);
var index = $scope.player.getQualityFor(type);
var bitrate = repSwitch ? Math.round(dashMetrics.getBandwidthForRepresentation(repSwitch.to, periodIdx) / 1000) : NaN;
var bitrate = repSwitch ? Math.round(dashAdapter.getBandwidthForRepresentation(repSwitch.to, periodIdx) / 1000) : NaN;
var droppedFPS = dashMetrics.getCurrentDroppedFrames(metrics) ? dashMetrics.getCurrentDroppedFrames(metrics).droppedFrames : 0;
var liveLatency = 0;
if ($scope.isDynamic) {
Expand Down
Loading

0 comments on commit 4ee40ce

Please sign in to comment.