Skip to content

Commit

Permalink
[player-1545] video element not being available to exit fullscreen.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilievOoyala committed Sep 12, 2017
1 parent 43c4663 commit b5e73a6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/google_ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -1372,14 +1372,11 @@ require("../html5-common/js/utils/utils.js");
_IMAAdsManager = adsManagerLoadedEvent.getAdsManager(_playheadTracker, adsSettings);

// When the ads manager is ready, we are ready to apply css changes to the video element
// If the sharedVideoElement is not used, mark it as null before applying css
if (this.videoControllerWrapper)
{
this.videoControllerWrapper.readyForCss = true;
}
if (!_IMAAdsManager.isCustomPlaybackUsed()) {
this.setupSharedVideoElement(null);
}

if (this.videoControllerWrapper)
{
this.videoControllerWrapper.applyStoredCss();
Expand Down Expand Up @@ -1622,8 +1619,12 @@ require("../html5-common/js/utils/utils.js");

//in the case where skippable ads are enabled we want to exit fullscreen
//because custom playback is disabled and ads can't be rendered in fullscreen.
if (_inlinePlaybackSupported() && OO.isIphone && this.enableIosSkippableAds === true) {
this.sharedVideoElement.webkitExitFullscreen();
if (_inlinePlaybackSupported() && OO.isIphone && this.enableIosSkippableAds === true)
{
if (this.sharedVideoElement)
{
this.sharedVideoElement.webkitExitFullscreen();
}
}
}
else
Expand Down

0 comments on commit b5e73a6

Please sign in to comment.