Skip to content

Commit

Permalink
fix(UI): Hide ad counter when the ad is non-linear (#7718)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored and joeyparrish committed Dec 12, 2024
1 parent ed86c71 commit cd67a0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/ad_counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ shaka.ui.AdCounter = class extends shaka.ui.Element {
goog.asserts.assert(this.ad != null,
'this.ad should exist at this point');

if (!this.ad.isLinear()) {
// Do not show information for non-linear ads.
return;
}

const secondsLeft = Math.round(this.ad.getRemainingTime());
const adDuration = this.ad.getDuration();
if (secondsLeft == -1 || adDuration == -1) {
Expand Down

0 comments on commit cd67a0f

Please sign in to comment.