Skip to content

Commit

Permalink
fix: Fix missing throughput in CMCD for HLS live (#3874)
Browse files Browse the repository at this point in the history
* Use dynamic reference to abrManager

Fixes #3873

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
  • Loading branch information
littlespex and dsparacio committed Jan 18, 2022
1 parent 1193a81 commit df55944
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/player.js
Expand Up @@ -2817,11 +2817,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
* @private
*/
createCmcd_() {
const abr = this.abrManager_;

/** @type {shaka.util.CmcdManager.PlayerInterface} */
const playerInterface = {
getBandwidthEstimate: () => abr ? abr.getBandwidthEstimate() : NaN,
getBandwidthEstimate: () => this.abrManager_ ?
this.abrManager_.getBandwidthEstimate() : NaN,
getBufferedInfo: () => this.getBufferedInfo(),
getCurrentTime: () => this.video_ ? this.video_.currentTime : 0,
getVariantTracks: () => this.getVariantTracks(),
Expand Down

0 comments on commit df55944

Please sign in to comment.