stormcloud-video-player 0.8.62 → 0.8.63

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.
@@ -3130,8 +3130,6 @@ function ingestPlayerTracking(licenseKey, channel, body) {
3130
3130
  }
3131
3131
  // src/utils/vastEnvironmentSignals.ts
3132
3132
  var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
3133
- var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
3134
- var inMemoryWebSessionId;
3135
3133
  var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
3136
3134
  var DEVICE_ID_STORAGE_KEYS = [
3137
3135
  "rdid",
@@ -3182,12 +3180,9 @@ function resolveVastEnvironmentSignals(isCtv) {
3182
3180
  deviceTypeHint: deviceTypeHint
3183
3181
  });
3184
3182
  }
3185
- var webSessionId = getOrCreateWebSessionId();
3186
3183
  return _object_spread_props(_object_spread({
3187
3184
  isCtv: false
3188
- }, webSessionId ? {
3189
- sessionId: webSessionId
3190
- } : {}, deviceId ? {
3185
+ }, deviceId ? {
3191
3186
  deviceId: deviceId
3192
3187
  } : {}, deviceId && deviceIdType ? {
3193
3188
  deviceIdType: deviceIdType
@@ -3385,21 +3380,6 @@ function getOrCreateCtvSessionId() {
3385
3380
  writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
3386
3381
  return sessionId;
3387
3382
  }
3388
- function getOrCreateWebSessionId() {
3389
- if (typeof window === "undefined") return void 0;
3390
- try {
3391
- var _window_sessionStorage;
3392
- var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
3393
- if (existing && !isMacroPlaceholder(existing)) return existing;
3394
- } catch (unused) {}
3395
- var sessionId = inMemoryWebSessionId || createUuid();
3396
- inMemoryWebSessionId = sessionId;
3397
- try {
3398
- var _window_sessionStorage1;
3399
- (_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
3400
- } catch (unused) {}
3401
- return sessionId;
3402
- }
3403
3383
  function readPersistentId(storageKey) {
3404
3384
  return readStoredString(storageKey) || readCookie(storageKey);
3405
3385
  }
@@ -4729,6 +4709,17 @@ function generateCorrelator() {
4729
4709
  }
4730
4710
  return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
4731
4711
  }
4712
+ var pageViewCorrelator;
4713
+ function getPageViewCorrelator() {
4714
+ var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
4715
+ if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
4716
+ pageViewCorrelator = {
4717
+ key: key,
4718
+ value: generateCorrelator()
4719
+ };
4720
+ }
4721
+ return pageViewCorrelator.value;
4722
+ }
4732
4723
  function expandInlineMacroPlaceholders(baseUrl, ctx) {
4733
4724
  var url = baseUrl;
4734
4725
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -4915,6 +4906,8 @@ function applyVastMacros(baseUrl, ctx) {
4915
4906
  }
4916
4907
  }
4917
4908
  }
4909
+ } else {
4910
+ params.set("unviewed_position_start", "1");
4918
4911
  }
4919
4912
  if (ctx.pod != null) {
4920
4913
  params.set("pod", String(ctx.pod));
@@ -6104,7 +6097,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
6104
6097
  this.vmapBreaks = [];
6105
6098
  this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
6106
6099
  this.streamCorrelator = generateCorrelator();
6107
- this.viewCorrelator = generateCorrelator();
6108
6100
  this.consentSignals = {};
6109
6101
  this.podCounter = 0;
6110
6102
  this.podAssignedByPrefetch = false;
@@ -6115,6 +6107,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
6115
6107
  this.video = video;
6116
6108
  }
6117
6109
  _create_class(AdConfigManager, [
6110
+ {
6111
+ key: "viewCorrelator",
6112
+ get: function get() {
6113
+ return getPageViewCorrelator();
6114
+ }
6115
+ },
6118
6116
  {
6119
6117
  key: "debug",
6120
6118
  get: function get() {
@@ -6572,7 +6570,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
6572
6570
  pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
6573
6571
  adWillPlayMuted: adWillPlayMuted,
6574
6572
  adWillAutoPlay: !!this.config.autoplay,
6575
- sessionId: envSignals.isCtv || this.consentSignals.storageAllowed !== false ? envSignals.sessionId : void 0,
6573
+ sessionId: envSignals.sessionId,
6576
6574
  deviceId: envSignals.deviceId,
6577
6575
  deviceIdType: envSignals.deviceIdType,
6578
6576
  limitAdTracking: envSignals.limitAdTracking,