Skip to content

Commit

Permalink
Fix DRM failures for custom content in the demo
Browse files Browse the repository at this point in the history
PR #1217 broke the demo app for custom clear content.  It caused DRM
errors by setting blank license server URIs in the config for custom
assets.  The fix is not to set license servers if the URI field is
blank.

Change-Id: Ia11ff5f49d246eeb5f17a18bd5ca4a4670a7e106
  • Loading branch information
joeyparrish committed Jan 19, 2018
1 parent c0f4f9d commit ef54418
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions demo/asset_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,14 @@ shakaDemo.preparePlayer_ = function(asset) {

if (!asset) {
// Use the custom fields.
var licenseServerUri = document.getElementById('licenseServerInput').value;
var licenseServers = {};
commonDrmSystems.forEach(function(system) {
licenseServers[system] =
document.getElementById('licenseServerInput').value;
});
if (licenseServerUri) {
commonDrmSystems.forEach(function(system) {
licenseServers[system] = licenseServerUri;
});
}

asset = /** @type {shakaAssets.AssetInfo} */ ({
manifestUri: document.getElementById('manifestInput').value,
// Use the custom license server for all key systems.
Expand Down

0 comments on commit ef54418

Please sign in to comment.