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