diff --git a/demo/main.js b/demo/main.js index 95a24da1ba..14b9031316 100644 --- a/demo/main.js +++ b/demo/main.js @@ -1233,9 +1233,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_) { @@ -1250,6 +1247,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,