Skip to content

Commit effaf95

Browse files
authored
fix(UI): Hide ad counter when the ad is non-linear (#7718)
1 parent e1d1d19 commit effaf95

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/ad_counter.js

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ shaka.ui.AdCounter = class extends shaka.ui.Element {
100100
goog.asserts.assert(this.ad != null,
101101
'this.ad should exist at this point');
102102

103+
if (!this.ad.isLinear()) {
104+
// Do not show information for non-linear ads.
105+
return;
106+
}
107+
103108
const secondsLeft = Math.round(this.ad.getRemainingTime());
104109
const adDuration = this.ad.getDuration();
105110
if (secondsLeft == -1 || adDuration == -1) {

0 commit comments

Comments
 (0)