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.
@@ -383,12 +383,8 @@ function createImaController(video, options) {
383
383
  let adsLoadedReject;
384
384
  function makeAdsRequest(google, vastTagUrl) {
385
385
  const adsRequest = new google.ima.AdsRequest();
386
- const preloadedResponse = preloadedVast.get(vastTagUrl);
387
- if (preloadedResponse) {
388
- adsRequest.adsResponse = preloadedResponse;
389
- } else {
390
- adsRequest.adTagUrl = vastTagUrl;
391
- }
386
+ console.log("[IMA] \u{1F4E1} Requesting VAST from URL (letting IMA fetch fresh)");
387
+ adsRequest.adTagUrl = vastTagUrl;
392
388
  const videoWidth = video.offsetWidth || video.clientWidth || 640;
393
389
  const videoHeight = video.offsetHeight || video.clientHeight || 360;
394
390
  adsRequest.linearAdSlotWidth = videoWidth;
@@ -411,11 +407,8 @@ function createImaController(video, options) {
411
407
  console.warn("[IMA] Failed to call setAdWillPlayMuted:", error);
412
408
  }
413
409
  }
414
- adsRequest.vastLoadTimeout = 5e3;
410
+ adsRequest.vastLoadTimeout = 1e4;
415
411
  adsLoader.requestAds(adsRequest);
416
- if (preloadedResponse) {
417
- preloadedVast.delete(vastTagUrl);
418
- }
419
412
  }
420
413
  function ensurePlaceholderContainer() {
421
414
  var _a;
@@ -3835,6 +3828,12 @@ var StormcloudVideoPlayer = class {
3835
3828
  );
3836
3829
  }
3837
3830
  mediaUrls = await this.fetchAndParseVastXml(vastTagUrl);
3831
+ if (this.config.debugAdTiming) {
3832
+ console.log(
3833
+ `[StormcloudVideoPlayer] Extracted ${mediaUrls.length} media URLs:`,
3834
+ mediaUrls
3835
+ );
3836
+ }
3838
3837
  if (mediaUrls.length > 0) {
3839
3838
  this.vastToMediaUrlMap.set(vastTagUrl, mediaUrls);
3840
3839
  }