Skip to content

Commit d17d522

Browse files
committed
fix requested changes
1 parent 13f2fbe commit d17d522

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

externs/ima.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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
*/
244245
google.ima.AdsRequest;

lib/ads/client_side_ad_manager.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)