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.
- 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.d.ts +4034 -0
- package/lib/index.js +12999 -0
- package/lib/index.js.map +1 -0
- 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 +5 -3
|
@@ -3080,8 +3080,6 @@ function ingestPlayerTracking(licenseKey, channel, body) {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
// src/utils/vastEnvironmentSignals.ts
|
|
3082
3082
|
var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
|
|
3083
|
-
var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
|
|
3084
|
-
var inMemoryWebSessionId;
|
|
3085
3083
|
var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
|
|
3086
3084
|
var DEVICE_ID_STORAGE_KEYS = [
|
|
3087
3085
|
"rdid",
|
|
@@ -3132,12 +3130,9 @@ function resolveVastEnvironmentSignals(isCtv) {
|
|
|
3132
3130
|
deviceTypeHint: deviceTypeHint
|
|
3133
3131
|
});
|
|
3134
3132
|
}
|
|
3135
|
-
var webSessionId = getOrCreateWebSessionId();
|
|
3136
3133
|
return _object_spread_props(_object_spread({
|
|
3137
3134
|
isCtv: false
|
|
3138
|
-
},
|
|
3139
|
-
sessionId: webSessionId
|
|
3140
|
-
} : {}, deviceId ? {
|
|
3135
|
+
}, deviceId ? {
|
|
3141
3136
|
deviceId: deviceId
|
|
3142
3137
|
} : {}, deviceId && deviceIdType ? {
|
|
3143
3138
|
deviceIdType: deviceIdType
|
|
@@ -3335,21 +3330,6 @@ function getOrCreateCtvSessionId() {
|
|
|
3335
3330
|
writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
|
|
3336
3331
|
return sessionId;
|
|
3337
3332
|
}
|
|
3338
|
-
function getOrCreateWebSessionId() {
|
|
3339
|
-
if (typeof window === "undefined") return void 0;
|
|
3340
|
-
try {
|
|
3341
|
-
var _window_sessionStorage;
|
|
3342
|
-
var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
|
|
3343
|
-
if (existing && !isMacroPlaceholder(existing)) return existing;
|
|
3344
|
-
} catch (unused) {}
|
|
3345
|
-
var sessionId = inMemoryWebSessionId || createUuid();
|
|
3346
|
-
inMemoryWebSessionId = sessionId;
|
|
3347
|
-
try {
|
|
3348
|
-
var _window_sessionStorage1;
|
|
3349
|
-
(_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
|
|
3350
|
-
} catch (unused) {}
|
|
3351
|
-
return sessionId;
|
|
3352
|
-
}
|
|
3353
3333
|
function readPersistentId(storageKey) {
|
|
3354
3334
|
return readStoredString(storageKey) || readCookie(storageKey);
|
|
3355
3335
|
}
|
|
@@ -4679,6 +4659,17 @@ function generateCorrelator() {
|
|
|
4679
4659
|
}
|
|
4680
4660
|
return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
|
|
4681
4661
|
}
|
|
4662
|
+
var pageViewCorrelator;
|
|
4663
|
+
function getPageViewCorrelator() {
|
|
4664
|
+
var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
|
|
4665
|
+
if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
|
|
4666
|
+
pageViewCorrelator = {
|
|
4667
|
+
key: key,
|
|
4668
|
+
value: generateCorrelator()
|
|
4669
|
+
};
|
|
4670
|
+
}
|
|
4671
|
+
return pageViewCorrelator.value;
|
|
4672
|
+
}
|
|
4682
4673
|
function expandInlineMacroPlaceholders(baseUrl, ctx) {
|
|
4683
4674
|
var url = baseUrl;
|
|
4684
4675
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -4865,6 +4856,8 @@ function applyVastMacros(baseUrl, ctx) {
|
|
|
4865
4856
|
}
|
|
4866
4857
|
}
|
|
4867
4858
|
}
|
|
4859
|
+
} else {
|
|
4860
|
+
params.set("unviewed_position_start", "1");
|
|
4868
4861
|
}
|
|
4869
4862
|
if (ctx.pod != null) {
|
|
4870
4863
|
params.set("pod", String(ctx.pod));
|
|
@@ -6054,7 +6047,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6054
6047
|
this.vmapBreaks = [];
|
|
6055
6048
|
this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
|
|
6056
6049
|
this.streamCorrelator = generateCorrelator();
|
|
6057
|
-
this.viewCorrelator = generateCorrelator();
|
|
6058
6050
|
this.consentSignals = {};
|
|
6059
6051
|
this.podCounter = 0;
|
|
6060
6052
|
this.podAssignedByPrefetch = false;
|
|
@@ -6065,6 +6057,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6065
6057
|
this.video = video;
|
|
6066
6058
|
}
|
|
6067
6059
|
_create_class(AdConfigManager, [
|
|
6060
|
+
{
|
|
6061
|
+
key: "viewCorrelator",
|
|
6062
|
+
get: function get() {
|
|
6063
|
+
return getPageViewCorrelator();
|
|
6064
|
+
}
|
|
6065
|
+
},
|
|
6068
6066
|
{
|
|
6069
6067
|
key: "debug",
|
|
6070
6068
|
get: function get() {
|
|
@@ -6522,7 +6520,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6522
6520
|
pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
|
|
6523
6521
|
adWillPlayMuted: adWillPlayMuted,
|
|
6524
6522
|
adWillAutoPlay: !!this.config.autoplay,
|
|
6525
|
-
sessionId: envSignals.
|
|
6523
|
+
sessionId: envSignals.sessionId,
|
|
6526
6524
|
deviceId: envSignals.deviceId,
|
|
6527
6525
|
deviceIdType: envSignals.deviceIdType,
|
|
6528
6526
|
limitAdTracking: envSignals.limitAdTracking,
|