Skip to content

Commit 2a84393

Browse files
committed
Added options to set one or more server certificate URLs to the Reference UI
1 parent aefba44 commit 2a84393

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

samples/dash-if-reference-player/app/main.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
185185
licenseServerUrl: '',
186186
httpRequestHeaders: {},
187187
serverCertificate: '',
188+
serverCertificateURLs: [],
188189
httpTimeout: 5000,
189190
priority: 1,
190191
audioRobustness: '',
@@ -198,6 +199,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
198199
licenseServerUrl: '',
199200
httpRequestHeaders: {},
200201
serverCertificate: '',
202+
serverCertificateURLs: [],
201203
httpTimeout: 5000,
202204
priority: 0,
203205
audioRobustness: '',
@@ -211,6 +213,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
211213
licenseServerUrl: '',
212214
httpRequestHeaders: {},
213215
serverCertificate: '',
216+
serverCertificateURLs: [],
214217
httpTimeout: 5000,
215218
kid: '',
216219
key: '',
@@ -225,6 +228,12 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
225228

226229
$scope.clearkeyRequestHeaders = [];
227230

231+
$scope.playreadyServerCertificateURLs = '';
232+
233+
$scope.widevineServerCertificateURLs = '';
234+
235+
$scope.clearkeyServerCertificateURLs = '';
236+
228237
$scope.additionalClearkeyPairs = [];
229238

230239
$scope.protData = {};
@@ -1026,6 +1035,9 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
10261035
$scope.playreadyRequestHeaders = [];
10271036
$scope.widevineRequestHeaders = [];
10281037
$scope.clearkeyRequestHeaders = [];
1038+
$scope.playreadyServerCertificateURLs = '';
1039+
$scope.widevineServerCertificateURLs = '';
1040+
$scope.clearkeyServerCertificateURLs = '';
10291041
$scope.clearkeys = [];
10301042
$scope.additionalClearkeyPairs = [];
10311043
}
@@ -1489,7 +1501,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
14891501
key !== 'priority' &&
14901502
key !== 'kid' &&
14911503
key !== 'key' &&
1492-
key !== 'inputMode') {
1504+
key !== 'inputMode'&&
1505+
key !== 'isCustomRobustness') {
14931506
protectionData[input.drmKeySystem][key] = input[key];
14941507
}
14951508
}
@@ -1536,7 +1549,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
15361549
key !== 'drmKeySystem' &&
15371550
key !== 'licenseServerUrl' &&
15381551
key !== 'httpRequestHeaders' &&
1539-
key !== 'priority') {
1552+
key !== 'priority' &&
1553+
key !== 'isCustomRobustness') {
15401554
protectionData[input.drmKeySystem][key] = input[key];
15411555
}
15421556
}
@@ -1592,6 +1606,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
15921606
kid: '',
15931607
key: ''
15941608
})
1609+
break;
15951610
}
15961611
}
15971612

@@ -1631,6 +1646,12 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
16311646
}
16321647
}
16331648

1649+
$scope.handleServerCertificateURLs = function () {
1650+
$scope.drmPlayready.serverCertificateURLs = $scope.playreadyServerCertificateURLs.split(/\s+/);
1651+
$scope.drmWidevine.serverCertificateURLs = $scope.widevineServerCertificateURLs.split(/\s+/);
1652+
$scope.drmClearkey.serverCertificateURLs = $scope.clearkeyServerCertificateURLs.split(/\s+/);
1653+
}
1654+
16341655
/** Handle multiple clearkeys */
16351656
$scope.handleClearkeys = function () {
16361657
// Initialize with empty

samples/dash-if-reference-player/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@
363363
<label class="options-label">Server Certificate</label>
364364
<input type="text" class="form-control" placeholder="" ng-model="drmPlayready.serverCertificate">
365365

366+
<label class="options-label" data-toggle="tooltip" data-placement="right"
367+
title="Enter one or more server certificate URLs separated by a white space.">Server Certifacte URLs</label>
368+
<input type="text" class="form-control" placeholder="" ng-model="playreadyServerCertificateURLs" ng-change="handleServerCertificateURLs()">
369+
366370
<label class="options-label">HTTP Timeout</label>
367371
<input type="text" class="form-control" placeholder="" ng-model="drmPlayready.httpTimeout">
368372

@@ -462,6 +466,10 @@
462466
<label class="options-label">Server Certificate</label>
463467
<input type="text" class="form-control" placeholder="" ng-model="drmWidevine.serverCertificate">
464468

469+
<label class="options-label" data-toggle="tooltip" data-placement="right"
470+
title="Enter one or more server certificate URLs separated by a white space.">Server Certifacte URLs</label>
471+
<input type="text" class="form-control" placeholder="" ng-model="widevineServerCertificateURLs" ng-change="handleServerCertificateURLs()">
472+
465473
<label class="options-label">HTTP Timeout</label>
466474
<input type="text" class="form-control" placeholder="" ng-model="drmWidevine.httpTimeout">
467475

@@ -575,6 +583,10 @@
575583
<label class="options-label">Server Certificate</label>
576584
<input type="text" class="form-control" placeholder="" ng-model="drmClearkey.serverCertificate">
577585

586+
<label class="options-label" data-toggle="tooltip" data-placement="right"
587+
title="Enter one or more server certificate URLs separated by a white space.">Server Certifacte URLs</label>
588+
<input type="text" class="form-control" placeholder="" ng-model="clearkeyServerCertificateURLs" ng-change="handleServerCertificateURLs()">
589+
578590
<label class="options-label">HTTP Timeout</label>
579591
<input type="text" class="form-control" placeholder="" ng-model="drmClearkey.httpTimeout">
580592

src/dash/vo/ContentProtection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2929
* POSSIBILITY OF SUCH DAMAGE.
3030
*/
31-
import CertUrlUtils from '../../streaming/utils/CertUrlUtils';
31+
import CertUrlUtils from '../../streaming/utils/CertUrlUtils.js';
3232
import DescriptorType from './DescriptorType.js'
3333
import DashConstants from '../constants/DashConstants.js';
3434

src/streaming/protection/controllers/ProtectionController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import DashJSError from '../../vo/DashJSError.js';
3737
import LicenseRequest from '../vo/LicenseRequest.js';
3838
import LicenseResponse from '../vo/LicenseResponse.js';
3939
import {HTTPRequest} from '../../vo/metrics/HTTPRequest.js';
40-
import CertUrlUtils from '../../utils/CertUrlUtils';
40+
import CertUrlUtils from '../../utils/CertUrlUtils.js';
4141
import Utils from '../../../core/Utils.js';
4242
import Constants from '../../constants/Constants.js';
4343
import FactoryMaker from '../../../core/FactoryMaker.js';

0 commit comments

Comments
 (0)