diff --git a/lib/util/cmcd_manager.js b/lib/util/cmcd_manager.js index c13a9bb292..6ea7287b96 100644 --- a/lib/util/cmcd_manager.js +++ b/lib/util/cmcd_manager.js @@ -31,7 +31,7 @@ shaka.util.CmcdManager = class { * * @private {string} */ - this.sid_ = config.sessionId || window.crypto.randomUUID(); + this.sid_ = ''; /** * Streaming format @@ -147,6 +147,10 @@ shaka.util.CmcdManager = class { */ applyTextData(request) { try { + if (!this.config_.enabled) { + return; + } + this.apply_(request, { ot: shaka.util.CmcdManager.ObjectType.CAPTION, su: true, @@ -217,6 +221,9 @@ shaka.util.CmcdManager = class { * @private */ createData_() { + if (!this.sid_) { + this.sid_ = this.config_.sessionId || window.crypto.randomUUID(); + } return { v: shaka.util.CmcdManager.Version, sf: this.sf_,