Skip to content

Commit

Permalink
don't show the (1 of 1) display next to the ad countdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jgubman committed May 13, 2016
1 parent 764cc46 commit f72ff2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/videojs.ima.js
Expand Up @@ -425,7 +425,8 @@
var currentTime = duration - remainingTime;
currentTime = currentTime > 0 ? currentTime : 0;
var isPod = false;
var adPosition, totalAds;
var totalAds = 0;
var adPosition;
if (currentAd.getAdPodInfo()) {
isPod = true;
adPosition = currentAd.getAdPodInfo().getAdPosition();
Expand All @@ -439,7 +440,7 @@
remainingSeconds = '0' + remainingSeconds;
}
var podCount = ': ';
if (isPod) {
if (isPod && (totalAds > 1)) {
podCount = ' (' + adPosition + ' of ' + totalAds + '): ';
}
countdownDiv.innerHTML =
Expand Down

0 comments on commit f72ff2b

Please sign in to comment.