File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -227,18 +227,19 @@ google.ima.AdEvent.Type = {
227227
228228/**
229229 * @typedef {{
230- * adsResponse: ? string,
231- * adTagUrl: string,
230+ * adsResponse: ( string|undefined) ,
231+ * adTagUrl: ( string|undefined) ,
232232 * }}
233233 *
234234 * @description Request for the ad server
235- * @property {string } adTagUrl
235+ * @property {string|undefined } adTagUrl
236236 * Specifies the ad tag url that is requested from the ad server.
237- * @property {?string } adsResponse
237+ * This parameter is optional if adsReponse is given.
238+ * @property {string|undefined } adsResponse
238239 * Specifies a VAST 2.0 document to be used as the ads response instead of
239240 * making a request via an ad tag url. This can be useful for debugging
240241 * and other situations where a VAST response is already available.
241- * This parameter is optional.
242+ * This parameter is optional if adTagUrl is given .
242243 * @exportDoc
243244 */
244245google . ima . AdsRequest ;
Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ shaka.ads.ClientSideAdManager = class {
8585 */
8686 requestAds ( imaRequest ) {
8787 goog . asserts . assert (
88- ( imaRequest . adTagUrl && imaRequest . adTagUrl . length ) ||
89- ( imaRequest . adsResponse && imaRequest . adsResponse . length ) ,
88+ imaRequest . adTagUrl || imaRequest . adsResponse ,
9089 'The ad tag needs to be set up before requesting ads, ' +
9190 'or adsResponse must be filled.' ) ;
9291 this . requestAdsStartTime_ = Date . now ( ) / 1000 ;
You can’t perform that action at this time.
0 commit comments