From 8c3907a7cdb44fec551c9e564b77724d2ff4f5c7 Mon Sep 17 00:00:00 2001 From: ShikiSeiren Date: Mon, 21 Feb 2022 13:08:09 +0100 Subject: [PATCH 1/3] Fixed DRM priorities not being correctly reflected in View --- samples/dash-if-reference-player/app/main.js | 18 ++++++++++++++---- samples/dash-if-reference-player/index.html | 6 +++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/samples/dash-if-reference-player/app/main.js b/samples/dash-if-reference-player/app/main.js index ee82aa0c67..1fd00f08e2 100644 --- a/samples/dash-if-reference-player/app/main.js +++ b/samples/dash-if-reference-player/app/main.js @@ -406,7 +406,6 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' $scope.player.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED, function (e) { /* jshint ignore:line */ stopMetricsInterval(); - $scope.videoQualities = $scope.player.getBitrateInfoListFor('video'); $scope.chartCount = 0; $scope.metricsTimer = setInterval(function () { @@ -1520,8 +1519,10 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' } } - prioritiesEnabled = settingsObject.prioritiesEnabled; - drmObject = $scope.makeProtectionData(drmObject, prioritiesEnabled); + prioritiesEnabled = settingsObject.drmPrioritiesEnabled; + if(prioritiesEnabled !== undefined){ + drmObject = $scope.makeProtectionData(drmObject, prioritiesEnabled); + } return [settingsObject, drmObject]; } @@ -1967,6 +1968,13 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' $scope.customABRRulesSelected = !currentConfig.streaming.abr.useDefaultABRRules; } + function setDrmOptions(){ + var currentConfig = $scope.player.getSettings(); + $scope.drmPlayready.priority = $scope.drmPlayready.priority.toString(); + $scope.drmWidevine.priority = $scope.drmWidevine.priority.toString(); + $scope.drmClearkey.priority = $scope.drmClearkey.priority.toString(); + } + function setLiveDelayOptions(){ var currentConfig = $scope.player.getSettings(); $scope.initialLiveDelay = currentConfig.streaming.delay.liveDelay; @@ -2110,12 +2118,14 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors' setAbrRules(); setAdditionalPlaybackOptions(); setAdditionalAbrOptions(); + setDrmOptions(); setLiveDelayOptions(); setInitialSettings(); setTrackSwitchModeSettings(); setInitialLogLevel(); setCMCDSettings(); - + + console.log($scope.player.getSettings()); checkLocationProtocol(); diff --git a/samples/dash-if-reference-player/index.html b/samples/dash-if-reference-player/index.html index e9462b3e13..994f691905 100644 --- a/samples/dash-if-reference-player/index.html +++ b/samples/dash-if-reference-player/index.html @@ -407,7 +407,7 @@
- @@ -588,7 +588,7 @@
-