From 9ef7c51d8a933a1cf90a21356a689b3854b78a3a Mon Sep 17 00:00:00 2001 From: Alex Eng Date: Thu, 24 Mar 2016 16:14:10 -0700 Subject: [PATCH] [PBI-1609] -workaround of an issue on Mac Safari where VPAID 2.0 video creative midrolls get stuck buffering --- js/ad_manager_vast.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/ad_manager_vast.js b/js/ad_manager_vast.js index 8e7722c..15fa66c 100644 --- a/js/ad_manager_vast.js +++ b/js/ad_manager_vast.js @@ -590,6 +590,16 @@ OO.Ads.manager(function(_, $) { this._slot = _createUniqueElement(); this._videoSlot = this.amc.ui.adVideoElement[0]; + //PBI-1609: Midroll VPAID 2.0 ads get stuck buffering on Mac Safari if + //the VPAID creative does not call load() on the video. This is not + //observed when using the Video Suite Inspector + + //Setting preload to auto seems to address this issue with our player + //TODO: Find the root cause behind this issue and address it + if (!OO.requiresSingleVideoElement && OO.isSafari) { + this._videoSlot.preload = "auto"; + } + environmentVariables = _.extend({ slot: this._slot, videoSlot: this._videoSlot, @@ -878,7 +888,7 @@ OO.Ads.manager(function(_, $) { if (isVPaid) { //Since a VPAID 2.0 ad handles its own UI, we want the video player to hide its UI elements this.amc.hidePlayerUi(); - _getFrame(); + _getFrame(); } else { // For VPAID we can only set the skip offset when ad already started initSkipAdOffset(adWrapper);