Skip to content

Commit

Permalink
fix(UI): Hide ad position when the ad is non-linear (#7711)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Dec 4, 2024
1 parent 6f4d2d2 commit 8566836
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/ad_position.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ shaka.ui.AdPosition = class extends shaka.ui.Element {
*/
setPosition_() {
const adsInAdPod = this.ad.getSequenceLength();
if (adsInAdPod > 1) {
if (adsInAdPod > 1 && this.ad.isLinear()) {
// If it's a single ad, showing 'Ad 1 of 1' isn't helpful.
// Only show this element if there's more than 1 ad.
// Only show this element if there's more than 1 ad and it's a linear ad.
const LocIds = shaka.ui.Locales.Ids;
const adPosition = this.ad.getPositionInSequence();
this.span_.textContent = this.localization.resolve(LocIds.AD_PROGRESS)
Expand Down

0 comments on commit 8566836

Please sign in to comment.