File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Alvaro Velad Galvan <alvaro.velad@mirada.tv>
2121Anthony Stansbridge <github@anthonystansbridge.co.uk>
2222Bonnier Broadcasting <*@bonnierbroadcasting.com>
2323Bryan Huh <bhh1988@gmail.com>
24+ Damien Deis <developer.deis@gmail.com>
2425Esteban Dosztal <edosztal@gmail.com>
2526Fadomire <fadomire@gmail.com>
2627Google Inc. <*@google.com>
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Bryan Huh <bhh1988@gmail.com>
3434Chad Assareh <assareh@google.com>
3535Chris Fillmore <fillmore.chris@gmail.com>
3636Costel Madalin Grecu <madalin.grecu@adswizz.com>
37+ Damien Deis <developer.deis@gmail.com>
3738Donato Borrello <donato@jwplayer.com>
3839Duc Pham <duc.pham@edgeware.tv>
3940Esteban Dosztal <edosztal@gmail.com>
Original file line number Diff line number Diff line change @@ -227,11 +227,19 @@ google.ima.AdEvent.Type = {
227227
228228/**
229229 * @typedef {{
230- * adTagUrl: string,
230+ * adsResponse: (string|undefined),
231+ * adTagUrl: (string|undefined),
231232 * }}
232233 *
233234 * @description Request for the ad server
234- * @property {string } adTagUrl
235+ * @property {string|undefined } adTagUrl
236+ * Specifies the ad tag url that is requested from the ad server.
237+ * This parameter is optional if adsReponse is given.
238+ * @property {string|undefined } adsResponse
239+ * Specifies a VAST 2.0 document to be used as the ads response instead of
240+ * making a request via an ad tag url. This can be useful for debugging
241+ * and other situations where a VAST response is already available.
242+ * This parameter is optional if adTagUrl is given.
235243 * @exportDoc
236244 */
237245google . ima . AdsRequest ;
Original file line number Diff line number Diff line change @@ -84,8 +84,10 @@ shaka.ads.ClientSideAdManager = class {
8484 * @param {!google.ima.AdsRequest } imaRequest
8585 */
8686 requestAds ( imaRequest ) {
87- goog . asserts . assert ( imaRequest . adTagUrl . length ,
88- 'The ad tag needs to be set up before requesting ads.' ) ;
87+ goog . asserts . assert (
88+ imaRequest . adTagUrl || imaRequest . adsResponse ,
89+ 'The ad tag needs to be set up before requesting ads, ' +
90+ 'or adsResponse must be filled.' ) ;
8991 this . requestAdsStartTime_ = Date . now ( ) / 1000 ;
9092 this . adsLoader_ . requestAds ( imaRequest ) ;
9193 }
You can’t perform that action at this time.
0 commit comments