From 4589227e3a036e3f93ad450fd4df66274044fe38 Mon Sep 17 00:00:00 2001 From: Nicolas ANGOT Date: Fri, 3 Feb 2017 16:49:26 +0100 Subject: [PATCH] the chart is drawn only for video and audio data. --- samples/dash-if-reference-player/app/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/samples/dash-if-reference-player/app/main.js b/samples/dash-if-reference-player/app/main.js index 12740f8b6a..d12cfe53e3 100644 --- a/samples/dash-if-reference-player/app/main.js +++ b/samples/dash-if-reference-player/app/main.js @@ -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();