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 { S as Scte35Marker, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-CSHvCbhZ.cjs';
1
+ import { a as Scte35Marker, S as StormcloudVideoPlayerConfig, A as AdController } from '../types-e6QV7SBp.cjs';
2
2
  import { AdTimingService } from './AdTimingService.cjs';
3
3
  import { AdConfigManager } from './AdConfigManager.cjs';
4
4
  import { Scte35CueManager } from './Scte35CueManager.cjs';
@@ -1,4 +1,4 @@
1
- import { b as AdBreak, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-CSHvCbhZ.cjs';
1
+ import { b as AdBreak, S as StormcloudVideoPlayerConfig, A as AdController } from '../types-e6QV7SBp.cjs';
2
2
  import { PalNonceManager } from '../sdk/pal.cjs';
3
3
  import { VastConsentSignals } from '../utils/vastMacros.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as StormcloudVideoPlayerConfig, S as Scte35Marker, A as AdController } from '../types-CSHvCbhZ.cjs';
1
+ import { S as StormcloudVideoPlayerConfig, a as Scte35Marker, A as AdController } from '../types-e6QV7SBp.cjs';
2
2
 
3
3
  interface AdTimingCallbacks {
4
4
  onAdStopTimerFired(): void;
@@ -1,5 +1,5 @@
1
1
  import Hls from 'hls.js';
2
- import { a as StormcloudVideoPlayerConfig, S as Scte35Marker } from '../types-CSHvCbhZ.cjs';
2
+ import { S as StormcloudVideoPlayerConfig, a as Scte35Marker } from '../types-e6QV7SBp.cjs';
3
3
  import { Scte35CueContext } from './playerTypes.cjs';
4
4
  import { Scte35CueManager } from './Scte35CueManager.cjs';
5
5
  import { AdTimingService } from './AdTimingService.cjs';
@@ -1,4 +1,4 @@
1
- import { A as AdController } from '../types-CSHvCbhZ.cjs';
1
+ import { A as AdController } from '../types-e6QV7SBp.cjs';
2
2
 
3
3
  declare function getAdAudioVolume(adPlayer: AdController): number;
4
4
  declare function toggleMute(video: HTMLVideoElement, adPlayer: AdController, debug: boolean): void;
@@ -1,4 +1,4 @@
1
- import { S as Scte35Marker } from '../types-CSHvCbhZ.cjs';
1
+ import { a as Scte35Marker } from '../types-e6QV7SBp.cjs';
2
2
  import { Scte35CueSource, Scte35CueReadiness, Scte35CueContext } from './playerTypes.cjs';
3
3
 
4
4
  interface Scte35CueManagerCallbacks {
@@ -1,4 +1,4 @@
1
- import { S as Scte35Marker, I as Id3TagInfo } from '../types-CSHvCbhZ.cjs';
1
+ import { a as Scte35Marker, I as Id3TagInfo } from '../types-e6QV7SBp.cjs';
2
2
 
3
3
  declare function parseCueOutDuration(value: string): number | undefined;
4
4
  declare function parseCueOutCont(value: string): {
@@ -725,24 +725,65 @@ function createHlsAdPlayer(contentVideo, options) {
725
725
  }
726
726
  }
727
727
  function fetchVastXml(vastTagUrl) {
728
+ var credentials = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "include";
728
729
  return _async_to_generator(function() {
729
- var response;
730
+ var requestVast, response, error;
730
731
  return _ts_generator(this, function(_state) {
731
732
  switch(_state.label){
732
733
  case 0:
733
- return [
734
- 4,
735
- fetch(vastTagUrl, {
734
+ requestVast = function requestVast(creds) {
735
+ return fetch(vastTagUrl, {
736
736
  mode: "cors",
737
- credentials: "include",
737
+ credentials: creds,
738
738
  headers: {
739
739
  "Accept": "application/xml, text/xml, */*"
740
740
  },
741
741
  referrerPolicy: "no-referrer-when-downgrade"
742
- })
743
- ];
742
+ });
743
+ };
744
+ _state.label = 1;
744
745
  case 1:
746
+ _state.trys.push([
747
+ 1,
748
+ 3,
749
+ ,
750
+ 7
751
+ ]);
752
+ return [
753
+ 4,
754
+ requestVast(credentials)
755
+ ];
756
+ case 2:
757
+ response = _state.sent();
758
+ return [
759
+ 3,
760
+ 7
761
+ ];
762
+ case 3:
763
+ error = _state.sent();
764
+ if (!(credentials !== "omit")) return [
765
+ 3,
766
+ 5
767
+ ];
768
+ console.warn('[HlsAdPlayer] VAST fetch failed with credentials="'.concat(credentials, '", retrying without credentials:'), error);
769
+ return [
770
+ 4,
771
+ requestVast("omit")
772
+ ];
773
+ case 4:
745
774
  response = _state.sent();
775
+ return [
776
+ 3,
777
+ 6
778
+ ];
779
+ case 5:
780
+ throw error;
781
+ case 6:
782
+ return [
783
+ 3,
784
+ 7
785
+ ];
786
+ case 7:
746
787
  if (!response.ok) {
747
788
  throw new Error("Failed to fetch VAST: ".concat(response.statusText));
748
789
  }
@@ -764,7 +805,7 @@ function createHlsAdPlayer(contentVideo, options) {
764
805
  depth = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : 0, accumulatedTracking = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : createEmptyTrackingUrls();
765
806
  return [
766
807
  4,
767
- fetchVastXml(vastTagUrl)
808
+ fetchVastXml(vastTagUrl, depth === 0 ? "include" : "omit")
768
809
  ];
769
810
  case 1:
770
811
  vastXml = _state.sent();
@@ -1617,6 +1658,22 @@ function createPalNonceManager() {
1617
1658
  request.videoHeight = options.videoHeight || 480;
1618
1659
  if (options.ppid) request.ppid = options.ppid;
1619
1660
  if (options.sessionId) request.sessionId = options.sessionId;
1661
+ console.log("[PAL] NonceRequest before generateNonce:", {
1662
+ adWillAutoPlay: request.adWillAutoPlay,
1663
+ adWillPlayMuted: request.adWillPlayMuted,
1664
+ playerVolume: request.playerVolume,
1665
+ continuousPlayback: request.continuousPlayback,
1666
+ descriptionUrl: request.descriptionUrl,
1667
+ iconsSupported: request.iconsSupported,
1668
+ playerType: request.playerType,
1669
+ playerVersion: request.playerVersion,
1670
+ supportedApiFrameworks: request.supportedApiFrameworks,
1671
+ url: request.url,
1672
+ videoWidth: request.videoWidth,
1673
+ videoHeight: request.videoHeight,
1674
+ ppid: request.ppid,
1675
+ sessionId: request.sessionId
1676
+ });
1620
1677
  return [
1621
1678
  4,
1622
1679
  loader.loadNonceManager(request)