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.
@@ -344,12 +344,8 @@ function createImaController(video, options) {
344
344
  let adsLoadedReject;
345
345
  function makeAdsRequest(google, vastTagUrl) {
346
346
  const adsRequest = new google.ima.AdsRequest();
347
- const preloadedResponse = preloadedVast.get(vastTagUrl);
348
- if (preloadedResponse) {
349
- adsRequest.adsResponse = preloadedResponse;
350
- } else {
351
- adsRequest.adTagUrl = vastTagUrl;
352
- }
347
+ console.log("[IMA] \u{1F4E1} Requesting VAST from URL (letting IMA fetch fresh)");
348
+ adsRequest.adTagUrl = vastTagUrl;
353
349
  const videoWidth = video.offsetWidth || video.clientWidth || 640;
354
350
  const videoHeight = video.offsetHeight || video.clientHeight || 360;
355
351
  adsRequest.linearAdSlotWidth = videoWidth;
@@ -372,11 +368,8 @@ function createImaController(video, options) {
372
368
  console.warn("[IMA] Failed to call setAdWillPlayMuted:", error);
373
369
  }
374
370
  }
375
- adsRequest.vastLoadTimeout = 5e3;
371
+ adsRequest.vastLoadTimeout = 1e4;
376
372
  adsLoader.requestAds(adsRequest);
377
- if (preloadedResponse) {
378
- preloadedVast.delete(vastTagUrl);
379
- }
380
373
  }
381
374
  function ensurePlaceholderContainer() {
382
375
  var _a;
@@ -3796,6 +3789,12 @@ var StormcloudVideoPlayer = class {
3796
3789
  );
3797
3790
  }
3798
3791
  mediaUrls = await this.fetchAndParseVastXml(vastTagUrl);
3792
+ if (this.config.debugAdTiming) {
3793
+ console.log(
3794
+ `[StormcloudVideoPlayer] Extracted ${mediaUrls.length} media URLs:`,
3795
+ mediaUrls
3796
+ );
3797
+ }
3799
3798
  if (mediaUrls.length > 0) {
3800
3799
  this.vastToMediaUrlMap.set(vastTagUrl, mediaUrls);
3801
3800
  }