stormcloud-video-player 0.8.30 → 0.8.32

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.
@@ -1,4 +1,4 @@
1
- import { a as StormcloudVideoPlayerConfig } from '../types-CSHvCbhZ.cjs';
1
+ import { S as StormcloudVideoPlayerConfig } from '../types-e6QV7SBp.cjs';
2
2
 
3
3
  declare class StormcloudVideoPlayer {
4
4
  private readonly video;
@@ -1,4 +1,4 @@
1
- import { S as Scte35Marker } from '../types-CSHvCbhZ.cjs';
1
+ import { a as Scte35Marker } from '../types-e6QV7SBp.cjs';
2
2
 
3
3
  type Scte35CueSource = "manifest" | "id3" | "ts";
4
4
  type Scte35CueReadiness = "early" | "playback";
@@ -776,24 +776,65 @@ function createHlsAdPlayer(contentVideo, options) {
776
776
  }
777
777
  }
778
778
  function fetchVastXml(vastTagUrl) {
779
+ var credentials = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "include";
779
780
  return _async_to_generator(function() {
780
- var response;
781
+ var requestVast, response, error;
781
782
  return _ts_generator(this, function(_state) {
782
783
  switch(_state.label){
783
784
  case 0:
784
- return [
785
- 4,
786
- fetch(vastTagUrl, {
785
+ requestVast = function requestVast(creds) {
786
+ return fetch(vastTagUrl, {
787
787
  mode: "cors",
788
- credentials: "include",
788
+ credentials: creds,
789
789
  headers: {
790
790
  "Accept": "application/xml, text/xml, */*"
791
791
  },
792
792
  referrerPolicy: "no-referrer-when-downgrade"
793
- })
794
- ];
793
+ });
794
+ };
795
+ _state.label = 1;
795
796
  case 1:
797
+ _state.trys.push([
798
+ 1,
799
+ 3,
800
+ ,
801
+ 7
802
+ ]);
803
+ return [
804
+ 4,
805
+ requestVast(credentials)
806
+ ];
807
+ case 2:
808
+ response = _state.sent();
809
+ return [
810
+ 3,
811
+ 7
812
+ ];
813
+ case 3:
814
+ error = _state.sent();
815
+ if (!(credentials !== "omit")) return [
816
+ 3,
817
+ 5
818
+ ];
819
+ console.warn('[HlsAdPlayer] VAST fetch failed with credentials="'.concat(credentials, '", retrying without credentials:'), error);
820
+ return [
821
+ 4,
822
+ requestVast("omit")
823
+ ];
824
+ case 4:
796
825
  response = _state.sent();
826
+ return [
827
+ 3,
828
+ 6
829
+ ];
830
+ case 5:
831
+ throw error;
832
+ case 6:
833
+ return [
834
+ 3,
835
+ 7
836
+ ];
837
+ case 7:
797
838
  if (!response.ok) {
798
839
  throw new Error("Failed to fetch VAST: ".concat(response.statusText));
799
840
  }
@@ -815,7 +856,7 @@ function createHlsAdPlayer(contentVideo, options) {
815
856
  depth = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : 0, accumulatedTracking = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : createEmptyTrackingUrls();
816
857
  return [
817
858
  4,
818
- fetchVastXml(vastTagUrl)
859
+ fetchVastXml(vastTagUrl, depth === 0 ? "include" : "omit")
819
860
  ];
820
861
  case 1:
821
862
  vastXml = _state.sent();
@@ -1668,6 +1709,22 @@ function createPalNonceManager() {
1668
1709
  request.videoHeight = options.videoHeight || 480;
1669
1710
  if (options.ppid) request.ppid = options.ppid;
1670
1711
  if (options.sessionId) request.sessionId = options.sessionId;
1712
+ console.log("[PAL] NonceRequest before generateNonce:", {
1713
+ adWillAutoPlay: request.adWillAutoPlay,
1714
+ adWillPlayMuted: request.adWillPlayMuted,
1715
+ playerVolume: request.playerVolume,
1716
+ continuousPlayback: request.continuousPlayback,
1717
+ descriptionUrl: request.descriptionUrl,
1718
+ iconsSupported: request.iconsSupported,
1719
+ playerType: request.playerType,
1720
+ playerVersion: request.playerVersion,
1721
+ supportedApiFrameworks: request.supportedApiFrameworks,
1722
+ url: request.url,
1723
+ videoWidth: request.videoWidth,
1724
+ videoHeight: request.videoHeight,
1725
+ ppid: request.ppid,
1726
+ sessionId: request.sessionId
1727
+ });
1671
1728
  return [
1672
1729
  4,
1673
1730
  loader.loadNonceManager(request)