Skip to content

Commit

Permalink
Merge pull request #375 from dailymotion/allowMultipleAds-config
Browse files Browse the repository at this point in the history
Fix allowMultipleAds option when resolving wrapper
  • Loading branch information
ZacharieTFR authored Dec 7, 2020
2 parents 35c07f6 + ece733f commit b6cb644
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 146 deletions.
2 changes: 2 additions & 0 deletions docs/api/3.0-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,5 @@ once parsed we will obtain :
* Inline sequence 3

### New bundler

Replaced rollup plugin used for minify from `uglify` to `terser`
6 changes: 5 additions & 1 deletion docs/api/vast-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ By default the fully parsed `VASTResponse` contains all the Ads contained in the
- `urlHandler: URLHandler` - Custom urlhandler to be used instead of the default ones [`urlhandlers`](../../src/urlhandlers)
- `urlhandler: URLHandler` - Fulfills the same purpose as `urlHandler`, which is the preferred parameter to use
- `resolveAll: Boolean` - Allows you to parse all the ads contained in the VAST or to parse them ad by ad or adPod by adPod (default `true`)
- `allowMultipleAds: Boolean` - A Boolean value that identifies whether multiple ads are allowed in the requested VAST response. This will override any value of allowMultipleAds attribute set in the VAST
- `followAdditionalWrappers: Boolean` - a Boolean value that identifies whether subsequent Wrappers after a requested VAST response is allowed. This will override any value of followAdditionalWrappers attribute set in the VAST

#### Example

Expand Down Expand Up @@ -289,10 +291,12 @@ vastClient.getNextAds(true)
});
```

#### getParser()
### getParser()

Returns the instance of `VASTParser` used by the client to parse the VAST. Use it to directly call a method provided by the `VASTParser` class.

#### Example

```Javascript
const vastClient = new VASTClient();
const vastParser = vastClient.getParser();
Expand Down
4 changes: 4 additions & 0 deletions docs/api/vast-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ Returns a `Promise` which either resolves with the fully parsed [`VASTResponse`]
- `wrapperLimit: Number` - A number of Wrapper responses that can be received with no InLine response (default `10`)
- `urlHandler: URLHandler` - Custom urlhandler to be used instead of the default ones [`urlhandlers`](../../src/urlhandlers)
- `urlhandler: URLHandler` - Fulfills the same purpose as `urlHandler`, which is the preferred parameter to use
- `allowMultipleAds: Boolean` - A boolean value that identifies whether multiple ads are allowed in the requested VAST response. This will override any value of allowMultipleAds attribute set in the VAST
- `followAdditionalWrappers: Boolean` - A boolean value that identifies whether subsequent Wrappers after a requested VAST response is allowed. This will override any value of followAdditionalWrappers attribute set in the VAST

#### Events emitted

Expand Down Expand Up @@ -291,6 +293,8 @@ Returns a `Promise` which either resolves with the fully parsed `VASTResponse` o
- `wrapperLimit: Number` - A number of Wrapper responses that can be received with no InLine response (default `10`)
- `urlHandler: URLHandler` - Custom urlhandler to be used instead of the default ones [`urlhandlers`](../../src/urlhandlers)
- `urlhandler: URLHandler` - Fulfills the same purpose as `urlHandler`, which is the preferred parameter to use
- `allowMultipleAds: Boolean` - A boolean value that identifies whether multiple ads are allowed in the requested VAST response. This will override any value of allowMultipleAds attribute set in the VAST
- `followAdditionalWrappers: Boolean` - A boolean value that identifies whether subsequent Wrappers after a requested VAST response is allowed. This will override any value of followAdditionalWrappers attribute set in the VAST

#### Events emitted

Expand Down
Loading

0 comments on commit b6cb644

Please sign in to comment.