Skip to content

Commit

Permalink
Merge pull request #285 from ooyala/player-4770
Browse files Browse the repository at this point in the history
[player-4770] - Skip Ad button is not shown for ad rules ads
  • Loading branch information
zelibobla authored Nov 20, 2018
2 parents a10826f + 612bf36 commit b0412f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/google_ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ require("../html5-common/js/utils/utils.js");
var _tryStartAdsManager = privateMember(function()
{
var notified = _tryNotifyUnmutedPlaybackFailed();
if (!notified && _IMAAdsManager && !_usingAdRules)
if (!notified && _IMAAdsManager)
{
OO.log("Starting IMA Ads Manager");
_IMAAdsManager.start();
Expand Down
12 changes: 6 additions & 6 deletions test/unit-tests/ima_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2721,8 +2721,8 @@ describe('ad_manager_ima', function()
play(false);
expect(google.ima.adsRequestMade).to.be(true);
expect(google.ima.adsManagerInitCalled).to.be(true);
//we don't need to call start for ad rules ads
expect(google.ima.adsManagerStarted).to.be(false);
//start is needed to show the skip ad button for ad rules ads. This is not documented by Google
expect(google.ima.adsManagerStarted).to.be(true);
});

it('Can preload an ad with preloadAds set to true and calling playAd with adRequestOnly set to true', function() {
Expand All @@ -2735,8 +2735,8 @@ describe('ad_manager_ima', function()
expect(google.ima.adsRequestMade).to.be(true);
play(false);
expect(google.ima.adsManagerInitCalled).to.be(true);
//we don't need to call start for ad rules ads
expect(google.ima.adsManagerStarted).to.be(false);
//start is needed to show the skip ad button for ad rules ads. This is not documented by Google
expect(google.ima.adsManagerStarted).to.be(true);
});

it('Ads Manager init is called after ad request is successful', function() {
Expand All @@ -2752,8 +2752,8 @@ describe('ad_manager_ima', function()
expect(google.ima.adsManagerInitCalled).to.be(false);
google.ima.delayedAdRequestCallback();
expect(google.ima.adsManagerInitCalled).to.be(true);
//we don't need to call start for ad rules ads
expect(google.ima.adsManagerStarted).to.be(false);
//start is needed to show the skip ad button for ad rules ads. This is not documented by Google
expect(google.ima.adsManagerStarted).to.be(true);
});
});

Expand Down

0 comments on commit b0412f8

Please sign in to comment.