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
|
@@ -310,8 +310,6 @@ __export(AdConfigManager_exports, {
|
|
|
310
310
|
module.exports = __toCommonJS(AdConfigManager_exports);
|
|
311
311
|
// src/utils/vastEnvironmentSignals.ts
|
|
312
312
|
var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
|
|
313
|
-
var WEB_SESSION_STORAGE_KEY = "stormcloud.web.sid";
|
|
314
|
-
var inMemoryWebSessionId;
|
|
315
313
|
var PLAYER_ID_STORAGE_KEY = "stormcloud.player.id";
|
|
316
314
|
var DEVICE_ID_STORAGE_KEYS = [
|
|
317
315
|
"rdid",
|
|
@@ -362,12 +360,9 @@ function resolveVastEnvironmentSignals(isCtv) {
|
|
|
362
360
|
deviceTypeHint: deviceTypeHint
|
|
363
361
|
});
|
|
364
362
|
}
|
|
365
|
-
var webSessionId = getOrCreateWebSessionId();
|
|
366
363
|
return _object_spread_props(_object_spread({
|
|
367
364
|
isCtv: false
|
|
368
|
-
},
|
|
369
|
-
sessionId: webSessionId
|
|
370
|
-
} : {}, deviceId ? {
|
|
365
|
+
}, deviceId ? {
|
|
371
366
|
deviceId: deviceId
|
|
372
367
|
} : {}, deviceId && deviceIdType ? {
|
|
373
368
|
deviceIdType: deviceIdType
|
|
@@ -565,21 +560,6 @@ function getOrCreateCtvSessionId() {
|
|
|
565
560
|
writePersistentId(CTV_SESSION_STORAGE_KEY, sessionId);
|
|
566
561
|
return sessionId;
|
|
567
562
|
}
|
|
568
|
-
function getOrCreateWebSessionId() {
|
|
569
|
-
if (typeof window === "undefined") return void 0;
|
|
570
|
-
try {
|
|
571
|
-
var _window_sessionStorage;
|
|
572
|
-
var existing = (_window_sessionStorage = window.sessionStorage) === null || _window_sessionStorage === void 0 ? void 0 : _window_sessionStorage.getItem(WEB_SESSION_STORAGE_KEY);
|
|
573
|
-
if (existing && !isMacroPlaceholder(existing)) return existing;
|
|
574
|
-
} catch (unused) {}
|
|
575
|
-
var sessionId = inMemoryWebSessionId || createUuid();
|
|
576
|
-
inMemoryWebSessionId = sessionId;
|
|
577
|
-
try {
|
|
578
|
-
var _window_sessionStorage1;
|
|
579
|
-
(_window_sessionStorage1 = window.sessionStorage) === null || _window_sessionStorage1 === void 0 ? void 0 : _window_sessionStorage1.setItem(WEB_SESSION_STORAGE_KEY, sessionId);
|
|
580
|
-
} catch (unused) {}
|
|
581
|
-
return sessionId;
|
|
582
|
-
}
|
|
583
563
|
function readPersistentId(storageKey) {
|
|
584
564
|
return readStoredString(storageKey) || readCookie(storageKey);
|
|
585
565
|
}
|
|
@@ -1080,6 +1060,17 @@ function generateCorrelator() {
|
|
|
1080
1060
|
}
|
|
1081
1061
|
return String(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1);
|
|
1082
1062
|
}
|
|
1063
|
+
var pageViewCorrelator;
|
|
1064
|
+
function getPageViewCorrelator() {
|
|
1065
|
+
var key = typeof window !== "undefined" ? window.location.pathname + window.location.search : "";
|
|
1066
|
+
if (!pageViewCorrelator || pageViewCorrelator.key !== key) {
|
|
1067
|
+
pageViewCorrelator = {
|
|
1068
|
+
key: key,
|
|
1069
|
+
value: generateCorrelator()
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
return pageViewCorrelator.value;
|
|
1073
|
+
}
|
|
1083
1074
|
function expandInlineMacroPlaceholders(baseUrl, ctx) {
|
|
1084
1075
|
var url = baseUrl;
|
|
1085
1076
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -1266,6 +1257,8 @@ function applyVastMacros(baseUrl, ctx) {
|
|
|
1266
1257
|
}
|
|
1267
1258
|
}
|
|
1268
1259
|
}
|
|
1260
|
+
} else {
|
|
1261
|
+
params.set("unviewed_position_start", "1");
|
|
1269
1262
|
}
|
|
1270
1263
|
if (ctx.pod != null) {
|
|
1271
1264
|
params.set("pod", String(ctx.pod));
|
|
@@ -1911,7 +1904,6 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
1911
1904
|
this.vmapBreaks = [];
|
|
1912
1905
|
this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
|
|
1913
1906
|
this.streamCorrelator = generateCorrelator();
|
|
1914
|
-
this.viewCorrelator = generateCorrelator();
|
|
1915
1907
|
this.consentSignals = {};
|
|
1916
1908
|
this.podCounter = 0;
|
|
1917
1909
|
this.podAssignedByPrefetch = false;
|
|
@@ -1922,6 +1914,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
1922
1914
|
this.video = video;
|
|
1923
1915
|
}
|
|
1924
1916
|
_create_class(AdConfigManager, [
|
|
1917
|
+
{
|
|
1918
|
+
key: "viewCorrelator",
|
|
1919
|
+
get: function get() {
|
|
1920
|
+
return getPageViewCorrelator();
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1925
1923
|
{
|
|
1926
1924
|
key: "debug",
|
|
1927
1925
|
get: function get() {
|
|
@@ -2379,7 +2377,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
|
|
|
2379
2377
|
pageUrl: !envSignals.isCtv && typeof window !== "undefined" ? toDevSafeUrl(window.location.href) : void 0,
|
|
2380
2378
|
adWillPlayMuted: adWillPlayMuted,
|
|
2381
2379
|
adWillAutoPlay: !!this.config.autoplay,
|
|
2382
|
-
sessionId: envSignals.
|
|
2380
|
+
sessionId: envSignals.sessionId,
|
|
2383
2381
|
deviceId: envSignals.deviceId,
|
|
2384
2382
|
deviceIdType: envSignals.deviceIdType,
|
|
2385
2383
|
limitAdTracking: envSignals.limitAdTracking,
|