Skip to content

Commit 8566836

Browse files
authored
fix(UI): Hide ad position when the ad is non-linear (#7711)
1 parent 6f4d2d2 commit 8566836

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/ad_position.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ shaka.ui.AdPosition = class extends shaka.ui.Element {
9191
*/
9292
setPosition_() {
9393
const adsInAdPod = this.ad.getSequenceLength();
94-
if (adsInAdPod > 1) {
94+
if (adsInAdPod > 1 && this.ad.isLinear()) {
9595
// If it's a single ad, showing 'Ad 1 of 1' isn't helpful.
96-
// Only show this element if there's more than 1 ad.
96+
// Only show this element if there's more than 1 ad and it's a linear ad.
9797
const LocIds = shaka.ui.Locales.Ids;
9898
const adPosition = this.ad.getPositionInSequence();
9999
this.span_.textContent = this.localization.resolve(LocIds.AD_PROGRESS)

0 commit comments

Comments
 (0)