From 822257093b27d34a8c8564891074f278844016cf Mon Sep 17 00:00:00 2001 From: Yury Pavlotsky Date: Thu, 7 Jun 2018 16:36:29 -0400 Subject: [PATCH] feat: expose vastLoadTimeout (#644) --- README.md | 1 + src/sdk-impl.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 053e0b53..30a84ae1 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ the previous snippet. A summary of all settings follows: | numRedirects | number | Maximum number of VAST redirects before the subsequent redirects will be denied,,and the ad load aborted. The number of redirects directly affects latency and thus user experience.,This applies to all VAST wrapper ads. | | showControlsForJSAds | boolean | Whether or not to show the control bar for VPAID JavaScript ads. Defaults to true. | | showCountdown | boolean | Whether or not to show the ad countdown timer. Defaults to true. | +| vastLoadTimeout | number | Override for default VAST load timeout in milliseconds for a single wrapper. The default timeout is 5000ms. | | vpaidAllowed | boolean | (DEPRECATED, please use vpaidMode). | | vpaidMode | VpaidMode(4) | VPAID Mode. Defaults to ENABLED. This setting,overrides vpaidAllowed. | diff --git a/src/sdk-impl.js b/src/sdk-impl.js index 42687aaf..9b6d5ba6 100644 --- a/src/sdk-impl.js +++ b/src/sdk-impl.js @@ -204,6 +204,10 @@ SdkImpl.prototype.requestAds = function() { adsRequest.forceNonLinearFullSlot = true; } + if (this.controller.getSettings().vastLoadTimeout) { + adsRequest.vastLoadTimeout = this.controller.getSettings().vastLoadTimeout; + } + adsRequest.linearAdSlotWidth = this.controller.getPlayerWidth(); adsRequest.linearAdSlotHeight = this.controller.getPlayerHeight(); adsRequest.nonLinearAdSlotWidth =