diff --git a/demo/main.js b/demo/main.js index 9eec59d126..db7ac5faac 100644 --- a/demo/main.js +++ b/demo/main.js @@ -1227,9 +1227,6 @@ shakaDemo.Main = class { // The currently-selected asset changed, so update asset cards. this.dispatchEventWithName_('shaka-main-selected-asset-changed'); - await this.drmConfiguration_(asset); - this.controls_.getCastProxy().setAppData({'asset': asset}); - // Enable the correct set of controls before loading. // The video container influences the TextDisplayer used. if (this.nativeControlsEnabled_) { @@ -1244,6 +1241,9 @@ shakaDemo.Main = class { this.player_.setVideoContainer(this.container_); } + await this.drmConfiguration_(asset); + this.controls_.getCastProxy().setAppData({'asset': asset}); + // Finally, the asset can be loaded. let manifestUri = asset.manifestUri; // If we have an offline copy, use that. If the offlineUri field is null,