diff --git a/lib/player.js b/lib/player.js index edef7e62af..1b58bbbe4d 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1891,6 +1891,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget { /* keepAdManager= */ false, /* isSwitchingContent= */ true); } + if (this.cmcdManager_) { + // The unload above (or a previous explicit unload()) stopped CMCD + // reporting; re-arm it before this load's first request goes out. + this.cmcdManager_.onLoad(); + } + // Add a mechanism to detect if the load process has been interrupted by a // call to another top-level operation (unload, load, etc). const operationId = ++this.operationId_; diff --git a/lib/util/cmcd_manager.js b/lib/util/cmcd_manager.js index aa7c50caaa..c797bb2e83 100644 --- a/lib/util/cmcd_manager.js +++ b/lib/util/cmcd_manager.js @@ -46,7 +46,8 @@ goog.requireType('shaka.Player'); * shapes into CML's HttpRequest/HttpResponse shapes. * * Adapter responsibilities: - * 1. Lifecycle: construct/start/stop CmcdReporter from configure() / reset() + * 1. Lifecycle: construct/start/stop CmcdReporter from configure() / + * onLoad() / reset() * 2. Player wiring: