Skip to content

Commit

Permalink
the chart is drawn only for video and audio data.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosang committed Feb 3, 2017
1 parent 9de5764 commit 4589227
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions samples/dash-if-reference-player/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,13 @@ app.controller('DashController', function($scope, sources, contributors) {

$scope.plotPoint = function(name, type, value) {
if ($scope.chartEnabled) {
var data = $scope.chartState[type][name].data;
data.push([$scope.video.currentTime, value]);
if (data.length > $scope.maxPointsToChart) {
data.splice(0, 1);
var specificChart = $scope.chartState[type];
if (specificChart) {
var data = specificChart[name].data;
data.push([$scope.video.currentTime, value]);
if (data.length > $scope.maxPointsToChart) {
data.splice(0, 1);
}
}
}
$scope.safeApply();
Expand Down

0 comments on commit 4589227

Please sign in to comment.