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.cjs
CHANGED
|
@@ -3319,8 +3319,6 @@ function ingestPlayerTracking(licenseKey, channel, body) {
|
|
|
3319
3319
|
}
|
|
3320
3320
|
// src/utils/vastEnvironmentSignals.ts
|
|
3321
3321
|
var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
|
|
3322
|
-
var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
|
|
3323
|
-
var inMemoryWebSessionId;
|
|
3324
3322
|
var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
|
|
3325
3323
|
var DEVICE_ID_STORAGE_KEYS = [
|
|
3326
3324
|
"rdid",
|
|
@@ -3371,12 +3369,9 @@ function resolveVastEnvironmentSignals(isCtv) {
|
|
|
3371
3369
|
deviceTypeHint: deviceTypeHint
|
|
3372
3370
|
});
|
|
3373
3371
|
}
|
|
3374
|
-
var webSessionId = getOrCreateWebSessionId();
|
|
3375
3372
|
return _object_spread_props(_object_spread({
|
|
3376
3373
|
isCtv: false
|
|
3377
|
-
},
|
|
3378
|
-
sessionId: webSessionId
|
|
3379
|
-
} : {}, deviceId ? {
|
|
3374
|
+
}, deviceId ? {
|
|
3380
3375
|
deviceId: deviceId
|
|
3381
3376
|
} : {}, deviceId && deviceIdType ? {
|
|
3382
3377
|
deviceIdType: deviceIdType
|
|
@@ -3574,21 +3569,6 @@ function getOrCreateCtvSessionId() {
|
|
|
3574
3569
|
writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
|
|
3575
3570
|
return sessionId;
|
|
3576
3571
|
}
|
|
3577
|
-
function getOrCreateWebSessionId() {
|
|
3578
|
-
if (typeof window === "undefined") return void 0;
|
|
3579
|
-
try {
|
|
3580
|
-
var _window_sessionStorage;
|
|
3581
|
-
var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
|
|
3582
|
-
if (existing && !isMacroPlaceholder(existing)) return existing;
|
|
3583
|
-
} catch (unused) {}
|
|
3584
|
-
var sessionId = inMemoryWebSessionId || createUuid();
|
|
3585
|
-
inMemoryWebSessionId = sessionId;
|
|
3586
|
-
try {
|
|
3587
|
-
var _window_sessionStorage1;
|
|
3588
|
-
(_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
|
|
3589
|
-
} catch (unused) {}
|
|
3590
|
-
return sessionId;
|
|
3591
|
-
}
|
|
3592
3572
|
function readPersistentId(storageKey) {
|
|
3593
3573
|
return readStoredString(storageKey) || readCookie(storageKey);
|
|
3594
3574
|
}
|
|
@@ -4918,6 +4898,17 @@ function generateCorrelator() {
|
|
|
4918
4898
|
}
|
|
4919
4899
|
return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
|
|
4920
4900
|
}
|
|
4901
|
+
var pageViewCorrelator;
|
|
4902
|
+
function getPageViewCorrelator() {
|
|
4903
|
+
var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
|
|
4904
|
+
if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
|
|
4905
|
+
pageViewCorrelator = {
|
|
4906
|
+
key: key,
|
|
4907
|
+
value: generateCorrelator()
|
|
4908
|
+
};
|
|
4909
|
+
}
|
|
4910
|
+
return pageViewCorrelator.value;
|
|
4911
|
+
}
|
|
4921
4912
|
function expandInlineMacroPlaceholders(baseUrl, ctx) {
|
|
4922
4913
|
var url = baseUrl;
|
|
4923
4914
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -5104,6 +5095,8 @@ function applyVastMacros(baseUrl, ctx) {
|
|
|
5104
5095
|
}
|
|
5105
5096
|
}
|
|
5106
5097
|
}
|
|
5098
|
+
} else {
|
|
5099
|
+
params.set("unviewed_position_start", "1");
|
|
5107
5100
|
}
|
|
5108
5101
|
if (ctx.pod != null) {
|
|
5109
5102
|
params.set("pod", String(ctx.pod));
|
|
@@ -6293,7 +6286,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6293
6286
|
this.vmapBreaks = [];
|
|
6294
6287
|
this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
|
|
6295
6288
|
this.streamCorrelator = generateCorrelator();
|
|
6296
|
-
this.viewCorrelator = generateCorrelator();
|
|
6297
6289
|
this.consentSignals = {};
|
|
6298
6290
|
this.podCounter = 0;
|
|
6299
6291
|
this.podAssignedByPrefetch = false;
|
|
@@ -6304,6 +6296,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6304
6296
|
this.video = video;
|
|
6305
6297
|
}
|
|
6306
6298
|
_create_class(AdConfigManager, [
|
|
6299
|
+
{
|
|
6300
|
+
key: "viewCorrelator",
|
|
6301
|
+
get: function get() {
|
|
6302
|
+
return getPageViewCorrelator();
|
|
6303
|
+
}
|
|
6304
|
+
},
|
|
6307
6305
|
{
|
|
6308
6306
|
key: "debug",
|
|
6309
6307
|
get: function get() {
|
|
@@ -6761,7 +6759,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
6761
6759
|
pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
|
|
6762
6760
|
adWillPlayMuted: adWillPlayMuted,
|
|
6763
6761
|
adWillAutoPlay: !!this.config.autoplay,
|
|
6764
|
-
sessionId: envSignals.
|
|
6762
|
+
sessionId: envSignals.sessionId,
|
|
6765
6763
|
deviceId: envSignals.deviceId,
|
|
6766
6764
|
deviceIdType: envSignals.deviceIdType,
|
|
6767
6765
|
limitAdTracking: envSignals.limitAdTracking,
|