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