stormcloud-video-player 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -341,12 +341,8 @@ function createImaController(video, options) {
341
341
  let adsLoadedReject;
342
342
  function makeAdsRequest(google, vastTagUrl) {
343
343
  const adsRequest = new google.ima.AdsRequest();
344
- const preloadedResponse = preloadedVast.get(vastTagUrl);
345
- if (preloadedResponse) {
346
- adsRequest.adsResponse = preloadedResponse;
347
- } else {
348
- adsRequest.adTagUrl = vastTagUrl;
349
- }
344
+ console.log("[IMA] \u{1F4E1} Requesting VAST from URL (letting IMA fetch fresh)");
345
+ adsRequest.adTagUrl = vastTagUrl;
350
346
  const videoWidth = video.offsetWidth || video.clientWidth || 640;
351
347
  const videoHeight = video.offsetHeight || video.clientHeight || 360;
352
348
  adsRequest.linearAdSlotWidth = videoWidth;
@@ -369,11 +365,8 @@ function createImaController(video, options) {
369
365
  console.warn("[IMA] Failed to call setAdWillPlayMuted:", error);
370
366
  }
371
367
  }
372
- adsRequest.vastLoadTimeout = 5e3;
368
+ adsRequest.vastLoadTimeout = 1e4;
373
369
  adsLoader.requestAds(adsRequest);
374
- if (preloadedResponse) {
375
- preloadedVast.delete(vastTagUrl);
376
- }
377
370
  }
378
371
  function ensurePlaceholderContainer() {
379
372
  var _a;
@@ -3793,6 +3786,12 @@ var StormcloudVideoPlayer = class {
3793
3786
  );
3794
3787
  }
3795
3788
  mediaUrls = await this.fetchAndParseVastXml(vastTagUrl);
3789
+ if (this.config.debugAdTiming) {
3790
+ console.log(
3791
+ `[StormcloudVideoPlayer] Extracted ${mediaUrls.length} media URLs:`,
3792
+ mediaUrls
3793
+ );
3794
+ }
3796
3795
  if (mediaUrls.length > 0) {
3797
3796
  this.vastToMediaUrlMap.set(vastTagUrl, mediaUrls);
3798
3797
  }