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/players/index.cjs
CHANGED
|
@@ -3163,8 +3163,6 @@ function ingestPlayerTracking(licenseKey, channel, body) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
// src/utils/vastEnvironmentSignals.ts
|
|
3165
3165
|
var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
|
|
3166
|
-
var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
|
|
3167
|
-
var inMemoryWebSessionId;
|
|
3168
3166
|
var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
|
|
3169
3167
|
var DEVICE_ID_STORAGE_KEYS = [
|
|
3170
3168
|
"rdid",
|
|
@@ -3215,12 +3213,9 @@ function resolveVastEnvironmentSignals(isCtv) {
|
|
|
3215
3213
|
deviceTypeHint: deviceTypeHint
|
|
3216
3214
|
});
|
|
3217
3215
|
}
|
|
3218
|
-
var webSessionId = getOrCreateWebSessionId();
|
|
3219
3216
|
return _object_spread_props(_object_spread({
|
|
3220
3217
|
isCtv: false
|
|
3221
|
-
},
|
|
3222
|
-
sessionId: webSessionId
|
|
3223
|
-
} : {}, deviceId ? {
|
|
3218
|
+
}, deviceId ? {
|
|
3224
3219
|
deviceId: deviceId
|
|
3225
3220
|
} : {}, deviceId && deviceIdType ? {
|
|
3226
3221
|
deviceIdType: deviceIdType
|
|
@@ -3418,21 +3413,6 @@ function getOrCreateCtvSessionId() {
|
|
|
3418
3413
|
writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
|
|
3419
3414
|
return sessionId;
|
|
3420
3415
|
}
|
|
3421
|
-
function getOrCreateWebSessionId() {
|
|
3422
|
-
if (typeof window === "undefined") return void 0;
|
|
3423
|
-
try {
|
|
3424
|
-
var _window_sessionStorage;
|
|
3425
|
-
var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
|
|
3426
|
-
if (existing && !isMacroPlaceholder(existing)) return existing;
|
|
3427
|
-
} catch (unused) {}
|
|
3428
|
-
var sessionId = inMemoryWebSessionId || createUuid();
|
|
3429
|
-
inMemoryWebSessionId = sessionId;
|
|
3430
|
-
try {
|
|
3431
|
-
var _window_sessionStorage1;
|
|
3432
|
-
(_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
|
|
3433
|
-
} catch (unused) {}
|
|
3434
|
-
return sessionId;
|
|
3435
|
-
}
|
|
3436
3416
|
function readPersistentId(storageKey) {
|
|
3437
3417
|
return readStoredString(storageKey) || readCookie(storageKey);
|
|
3438
3418
|
}
|
|
@@ -4762,6 +4742,17 @@ function generateCorrelator() {
|
|
|
4762
4742
|
}
|
|
4763
4743
|
return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
|
|
4764
4744
|
}
|
|
4745
|
+
var pageViewCorrelator;
|
|
4746
|
+
function getPageViewCorrelator() {
|
|
4747
|
+
var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
|
|
4748
|
+
if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
|
|
4749
|
+
pageViewCorrelator = {
|
|
4750
|
+
key: key,
|
|
4751
|
+
value: generateCorrelator()
|
|
4752
|
+
};
|
|
4753
|
+
}
|
|
4754
|
+
return pageViewCorrelator.value;
|
|
4755
|
+
}
|
|
4765
4756
|
function expandInlineMacroPlaceholders(baseUrl, ctx) {
|
|
4766
4757
|
var url = baseUrl;
|
|
4767
4758
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -4948,6 +4939,8 @@ function applyVastMacros(baseUrl, ctx) {
|
|
|
4948
4939
|
}
|
|
4949
4940
|
}
|
|
4950
4941
|
}
|
|
4942
|
+
} else {
|
|
4943
|
+
params.set("unviewed_position_start", "1");
|
|
4951
4944
|
}
|
|
4952
4945
|
if (ctx.pod != null) {
|
|
4953
4946
|
params.set("pod", String(ctx.pod));
|
|
@@ -6137,7 +6130,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6137
6130
|
this.vmapBreaks = [];
|
|
6138
6131
|
this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
|
|
6139
6132
|
this.streamCorrelator = generateCorrelator();
|
|
6140
|
-
this.viewCorrelator = generateCorrelator();
|
|
6141
6133
|
this.consentSignals = {};
|
|
6142
6134
|
this.podCounter = 0;
|
|
6143
6135
|
this.podAssignedByPrefetch = false;
|
|
@@ -6148,6 +6140,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6148
6140
|
this.video = video;
|
|
6149
6141
|
}
|
|
6150
6142
|
_create_class(AdConfigManager, [
|
|
6143
|
+
{
|
|
6144
|
+
key: "viewCorrelator",
|
|
6145
|
+
get: function get() {
|
|
6146
|
+
return getPageViewCorrelator();
|
|
6147
|
+
}
|
|
6148
|
+
},
|
|
6151
6149
|
{
|
|
6152
6150
|
key: "debug",
|
|
6153
6151
|
get: function get() {
|
|
@@ -6605,7 +6603,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6605
6603
|
pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
|
|
6606
6604
|
adWillPlayMuted: adWillPlayMuted,
|
|
6607
6605
|
adWillAutoPlay: !!this.config.autoplay,
|
|
6608
|
-
sessionId: envSignals.
|
|
6606
|
+
sessionId: envSignals.sessionId,
|
|
6609
6607
|
deviceId: envSignals.deviceId,
|
|
6610
6608
|
deviceIdType: envSignals.deviceIdType,
|
|
6611
6609
|
limitAdTracking: envSignals.limitAdTracking,
|