Skip to content

Commit

Permalink
feat: expose vastLoadTimeout (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypavlotsky committed Jun 7, 2018
1 parent 2255a11 commit 8222570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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. |

Expand Down
4 changes: 4 additions & 0 deletions src/sdk-impl.js
Expand Up @@ -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 =
Expand Down

0 comments on commit 8222570

Please sign in to comment.