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.
- package/dist/stormcloud-vp.min.js +1 -1
- package/lib/StormcloudPlayer.cjs +21 -23
- package/lib/StormcloudPlayer.cjs.map +1 -1
- package/lib/index.cjs +21 -23
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +21 -23
- package/lib/index.js.map +1 -1
- package/lib/player/AdConfigManager.cjs +21 -23
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +21 -23
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +21 -23
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +21 -23
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +21 -23
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/ctvVastSignals.cjs +1 -21
- package/lib/utils/ctvVastSignals.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.cjs +1 -21
- package/lib/utils/vastEnvironmentSignals.cjs.map +1 -1
- package/lib/utils/vastMacros.cjs +17 -0
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastMacros.d.cts +2 -1
- package/package.json +1 -1
|
@@ -3117,8 +3117,6 @@ function ingestPlayerTracking(licenseKey, channel, body) {
|
|
|
3117
3117
|
}
|
|
3118
3118
|
// src/utils/vastEnvironmentSignals.ts
|
|
3119
3119
|
var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
|
|
3120
|
-
var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
|
|
3121
|
-
var inMemoryWebSessionId;
|
|
3122
3120
|
var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
|
|
3123
3121
|
var DEVICE_ID_STORAGE_KEYS = [
|
|
3124
3122
|
"rdid",
|
|
@@ -3169,12 +3167,9 @@ function resolveVastEnvironmentSignals(isCtv) {
|
|
|
3169
3167
|
deviceTypeHint: deviceTypeHint
|
|
3170
3168
|
});
|
|
3171
3169
|
}
|
|
3172
|
-
var webSessionId = getOrCreateWebSessionId();
|
|
3173
3170
|
return _object_spread_props(_object_spread({
|
|
3174
3171
|
isCtv: false
|
|
3175
|
-
},
|
|
3176
|
-
sessionId: webSessionId
|
|
3177
|
-
} : {}, deviceId ? {
|
|
3172
|
+
}, deviceId ? {
|
|
3178
3173
|
deviceId: deviceId
|
|
3179
3174
|
} : {}, deviceId && deviceIdType ? {
|
|
3180
3175
|
deviceIdType: deviceIdType
|
|
@@ -3372,21 +3367,6 @@ function getOrCreateCtvSessionId() {
|
|
|
3372
3367
|
writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
|
|
3373
3368
|
return sessionId;
|
|
3374
3369
|
}
|
|
3375
|
-
function getOrCreateWebSessionId() {
|
|
3376
|
-
if (typeof window === "undefined") return void 0;
|
|
3377
|
-
try {
|
|
3378
|
-
var _window_sessionStorage;
|
|
3379
|
-
var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
|
|
3380
|
-
if (existing && !isMacroPlaceholder(existing)) return existing;
|
|
3381
|
-
} catch (unused) {}
|
|
3382
|
-
var sessionId = inMemoryWebSessionId || createUuid();
|
|
3383
|
-
inMemoryWebSessionId = sessionId;
|
|
3384
|
-
try {
|
|
3385
|
-
var _window_sessionStorage1;
|
|
3386
|
-
(_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
|
|
3387
|
-
} catch (unused) {}
|
|
3388
|
-
return sessionId;
|
|
3389
|
-
}
|
|
3390
3370
|
function readPersistentId(storageKey) {
|
|
3391
3371
|
return readStoredString(storageKey) || readCookie(storageKey);
|
|
3392
3372
|
}
|
|
@@ -4716,6 +4696,17 @@ function generateCorrelator() {
|
|
|
4716
4696
|
}
|
|
4717
4697
|
return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
|
|
4718
4698
|
}
|
|
4699
|
+
var pageViewCorrelator;
|
|
4700
|
+
function getPageViewCorrelator() {
|
|
4701
|
+
var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
|
|
4702
|
+
if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
|
|
4703
|
+
pageViewCorrelator = {
|
|
4704
|
+
key: key,
|
|
4705
|
+
value: generateCorrelator()
|
|
4706
|
+
};
|
|
4707
|
+
}
|
|
4708
|
+
return pageViewCorrelator.value;
|
|
4709
|
+
}
|
|
4719
4710
|
function expandInlineMacroPlaceholders(baseUrl, ctx) {
|
|
4720
4711
|
var url = baseUrl;
|
|
4721
4712
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -4902,6 +4893,8 @@ function applyVastMacros(baseUrl, ctx) {
|
|
|
4902
4893
|
}
|
|
4903
4894
|
}
|
|
4904
4895
|
}
|
|
4896
|
+
} else {
|
|
4897
|
+
params.set("unviewed_position_start", "1");
|
|
4905
4898
|
}
|
|
4906
4899
|
if (ctx.pod != null) {
|
|
4907
4900
|
params.set("pod", String(ctx.pod));
|
|
@@ -6091,7 +6084,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6091
6084
|
this.vmapBreaks = [];
|
|
6092
6085
|
this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
|
|
6093
6086
|
this.streamCorrelator = generateCorrelator();
|
|
6094
|
-
this.viewCorrelator = generateCorrelator();
|
|
6095
6087
|
this.consentSignals = {};
|
|
6096
6088
|
this.podCounter = 0;
|
|
6097
6089
|
this.podAssignedByPrefetch = false;
|
|
@@ -6102,6 +6094,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6102
6094
|
this.video = video;
|
|
6103
6095
|
}
|
|
6104
6096
|
_create_class(AdConfigManager, [
|
|
6097
|
+
{
|
|
6098
|
+
key: "viewCorrelator",
|
|
6099
|
+
get: function get() {
|
|
6100
|
+
return getPageViewCorrelator();
|
|
6101
|
+
}
|
|
6102
|
+
},
|
|
6105
6103
|
{
|
|
6106
6104
|
key: "debug",
|
|
6107
6105
|
get: function get() {
|
|
@@ -6559,7 +6557,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6559
6557
|
pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
|
|
6560
6558
|
adWillPlayMuted: adWillPlayMuted,
|
|
6561
6559
|
adWillAutoPlay: !!this.config.autoplay,
|
|
6562
|
-
sessionId: envSignals.
|
|
6560
|
+
sessionId: envSignals.sessionId,
|
|
6563
6561
|
deviceId: envSignals.deviceId,
|
|
6564
6562
|
deviceIdType: envSignals.deviceIdType,
|
|
6565
6563
|
limitAdTracking: envSignals.limitAdTracking,
|