diff --git a/samples/dash-if-reference-player/app/main.js b/samples/dash-if-reference-player/app/main.js index b69a2bda86..aeea8b550e 100644 --- a/samples/dash-if-reference-player/app/main.js +++ b/samples/dash-if-reference-player/app/main.js @@ -296,6 +296,12 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' $scope.audioLiveLatency = 0; $scope.audioPlaybackRate = 1.00; + $scope.activePeriod = ''; + $scope.bufferingPeriod = ''; + + $scope.mpdType = ''; + $scope.numberOfPeriods = 0; + // Starting Options $scope.autoPlaySelected = true; $scope.autoLoadSelected = false; @@ -436,6 +442,12 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' $scope.player.on(dashjs.MediaPlayer.events.MANIFEST_LOADED, function (e) { $scope.isDynamic = e.data.type === 'dynamic'; + if (e.data.Period) { + $scope.numberOfPeriods = e.data.Period.length; + } + if (e.data.type) { + $scope.mpdType = e.data.type; + } }, $scope); @@ -452,11 +464,16 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' $scope[e.mediaType + 'Bitrate'] = bitrate; $scope.plotPoint('pendingIndex', e.mediaType, e.newQuality + 1, getTimeForPlot()); $scope.safeApply(); + + if (e.currentRepresentation && e.currentRepresentation.adaptation && e.currentRepresentation.adaptation.period) { + $scope.bufferingPeriod = e.currentRepresentation.adaptation.period.id; + } }, $scope); $scope.player.on(dashjs.MediaPlayer.events.PERIOD_SWITCH_COMPLETED, function (e) { $scope.currentStreamInfo = e.toStreamInfo; + $scope.activePeriod = e.toStreamInfo.id; }, $scope); $scope.player.on(dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED, function (e) { @@ -1481,11 +1498,11 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' protectionData[input.drmKeySystem]['httpRequestHeaders'] = input.httpRequestHeaders; } - if(input.audioRobustness){ + if (input.audioRobustness) { protectionData[input.drmKeySystem]['audioRobustness'] = input.audioRobustness; } - if(input.videoRobustness){ + if (input.videoRobustness) { protectionData[input.drmKeySystem]['videoRobustness'] = input.videoRobustness; } } else { @@ -1529,11 +1546,11 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' protectionData[input.drmKeySystem]['httpRequestHeaders'] = input.httpRequestHeaders; } - if(input.audioRobustness){ + if (input.audioRobustness) { protectionData[input.drmKeySystem]['audioRobustness'] = input.audioRobustness; } - if(input.videoRobustness){ + if (input.videoRobustness) { protectionData[input.drmKeySystem]['videoRobustness'] = input.videoRobustness; } } @@ -2177,8 +2194,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' else if (value === 'null') typedValue = null; else if (value === 'undefined') typedValue = undefined; else integerRegEx.test(value) ? typedValue = parseInt(value) : - (floatRegEx.test(value) ? typedValue = parseFloat(value) : - typedValue = value); + (floatRegEx.test(value) ? typedValue = parseFloat(value) : + typedValue = value); return typedValue; } diff --git a/samples/dash-if-reference-player/index.html b/samples/dash-if-reference-player/index.html index 6dd38d1753..aed69e8acd 100644 --- a/samples/dash-if-reference-player/index.html +++ b/samples/dash-if-reference-player/index.html @@ -1104,6 +1104,14 @@
UpdatedExp Audio +
  • + Playback + +
  • +
  • + MPD + +
  • @@ -1319,6 +1327,36 @@
    UpdatedExp +
    +
    + +
    + {{activePeriod}} +
    +
    + {{bufferingPeriod}} +
    +
    +
    +
    +
    + +
    + {{mpdType}} +
    +
    + {{numberOfPeriods}} +
    +
    +