Skip to content

Commit

Permalink
Merge pull request #1782 from Orange-OpenSource/webAppBugFix2
Browse files Browse the repository at this point in the history
the chart is drawn only for video and audio data.
  • Loading branch information
Dan Sparacio committed Feb 9, 2017
2 parents 27c275a + 4589227 commit 0f3d52b
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 0f3d52b

Please sign in to comment.