stormcloud-video-player 0.8.80 → 0.8.81
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 +2 -2
- package/lib/Player.d.cts +2 -1
- package/lib/StormcloudPlayer.cjs +452 -139
- package/lib/StormcloudPlayer.cjs.map +1 -1
- package/lib/StormcloudPlayer.d.cts +1 -0
- package/lib/index.cjs +478 -140
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1 -0
- package/lib/index.d.ts +30 -5
- package/lib/index.js +478 -140
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +37 -9
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +1 -0
- package/lib/player/AdConfigManager.cjs +408 -123
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +2 -0
- package/lib/player/AdTimingService.d.cts +1 -0
- package/lib/player/EdgePodRequest.d.cts +1 -0
- package/lib/player/FloorLadder.d.cts +1 -0
- package/lib/player/HlsEngine.d.cts +1 -0
- package/lib/player/OptimizedPodRequest.cjs +17 -5
- package/lib/player/OptimizedPodRequest.cjs.map +1 -1
- package/lib/player/PlayerControls.d.cts +1 -0
- package/lib/player/Scte35CueManager.d.cts +1 -0
- package/lib/player/Scte35Parser.d.cts +1 -0
- package/lib/player/StormcloudVideoPlayer.cjs +452 -139
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +5 -4
- package/lib/player/playerTypes.d.cts +1 -0
- package/lib/players/HlsPlayer.cjs +452 -139
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -0
- package/lib/players/index.cjs +452 -139
- package/lib/players/index.cjs.map +1 -1
- package/lib/props.d.cts +1 -0
- package/lib/sdk/hlsAdPlayer.d.cts +1 -0
- package/lib/types.d.cts +7 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +478 -140
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -0
- package/lib/utils/__tests__/adSignals.test.cjs +169 -14
- package/lib/utils/__tests__/adSignals.test.cjs.map +1 -1
- package/lib/utils/contentMetadata.cjs +120 -4
- package/lib/utils/contentMetadata.cjs.map +1 -1
- package/lib/utils/contentMetadata.d.cts +37 -1
- package/lib/utils/deviceInfo.cjs +24 -4
- package/lib/utils/deviceInfo.cjs.map +1 -1
- package/lib/utils/deviceInfo.d.cts +3 -0
- package/lib/utils/partnerSignals.cjs +294 -0
- package/lib/utils/partnerSignals.cjs.map +1 -0
- package/lib/utils/partnerSignals.d.cts +12 -0
- package/lib/utils/tracking.cjs +24 -4
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -0
- package/lib/utils/vastMacros.cjs +51 -1
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastMacros.d.cts +20 -0
- package/package.json +1 -1
|
@@ -896,7 +896,8 @@ var NESTED_QUERY_PARAM_KEYS = /* @__PURE__ */ new Set([
|
|
|
896
896
|
var SCVP_POD_MACROS = /* @__PURE__ */ new Set([
|
|
897
897
|
"PMND",
|
|
898
898
|
"PMXD",
|
|
899
|
-
"PMAD"
|
|
899
|
+
"PMAD",
|
|
900
|
+
"MABD"
|
|
900
901
|
]);
|
|
901
902
|
function safeDecode(value) {
|
|
902
903
|
try {
|
|
@@ -1383,6 +1384,11 @@ function readBridge(keys) {
|
|
|
1383
1384
|
}
|
|
1384
1385
|
return void 0;
|
|
1385
1386
|
}
|
|
1387
|
+
function makeForCategory(category) {
|
|
1388
|
+
if (category === "LG TV" || category === "LG Set-Top Box") return "LG";
|
|
1389
|
+
if (category === "Samsung TV") return "Samsung";
|
|
1390
|
+
return void 0;
|
|
1391
|
+
}
|
|
1386
1392
|
function normalizeCategory(value) {
|
|
1387
1393
|
var v = cleanString(value);
|
|
1388
1394
|
if (!v) return void 0;
|
|
@@ -1481,7 +1487,7 @@ function categorize(platform, model) {
|
|
|
1481
1487
|
return "Other";
|
|
1482
1488
|
}
|
|
1483
1489
|
function getDeviceInfo() {
|
|
1484
|
-
var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory;
|
|
1490
|
+
var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory, _ref3, _cleanString4, _cleanString5;
|
|
1485
1491
|
var platform = platformCache !== null && platformCache !== void 0 ? platformCache : computePlatformInfo();
|
|
1486
1492
|
if (primePromise && !platformCache) {} else {
|
|
1487
1493
|
platformCache = platform;
|
|
@@ -1504,7 +1510,14 @@ function getDeviceInfo() {
|
|
|
1504
1510
|
]),
|
|
1505
1511
|
category: normalizeCategory(readBridge([
|
|
1506
1512
|
"deviceCategory"
|
|
1507
|
-
]))
|
|
1513
|
+
])),
|
|
1514
|
+
make: readBridge([
|
|
1515
|
+
"deviceMake"
|
|
1516
|
+
]),
|
|
1517
|
+
hardwareVersion: readBridge([
|
|
1518
|
+
"deviceHardwareVersion",
|
|
1519
|
+
"hardwareVersion"
|
|
1520
|
+
])
|
|
1508
1521
|
};
|
|
1509
1522
|
var terminalId = (_cleanString = cleanString(host.terminalId)) !== null && _cleanString !== void 0 ? _cleanString : bridge.terminalId;
|
|
1510
1523
|
var hostInternalId = (_cleanString1 = cleanString(host.internalDeviceId)) !== null && _cleanString1 !== void 0 ? _cleanString1 : bridge.internalDeviceId;
|
|
@@ -1517,7 +1530,9 @@ function getDeviceInfo() {
|
|
|
1517
1530
|
bridge.internalDeviceId,
|
|
1518
1531
|
bridge.model,
|
|
1519
1532
|
bridge.firmware,
|
|
1520
|
-
bridge.category
|
|
1533
|
+
bridge.category,
|
|
1534
|
+
bridge.make,
|
|
1535
|
+
bridge.hardwareVersion
|
|
1521
1536
|
];
|
|
1522
1537
|
if (bridgeValues.some(function(v) {
|
|
1523
1538
|
return v !== void 0;
|
|
@@ -1525,12 +1540,18 @@ function getDeviceInfo() {
|
|
|
1525
1540
|
if (hostDeviceInfo) sources.unshift("host");
|
|
1526
1541
|
var internalDeviceId = hostInternalId !== null && hostInternalId !== void 0 ? hostInternalId : platform.internalDeviceId;
|
|
1527
1542
|
var internalDeviceIdSource = hostInternalId ? "host" : platform.internalDeviceIdSource;
|
|
1543
|
+
var make = (_ref3 = (_cleanString4 = cleanString(host.make, 40)) !== null && _cleanString4 !== void 0 ? _cleanString4 : bridge.make) !== null && _ref3 !== void 0 ? _ref3 : makeForCategory(category);
|
|
1544
|
+
var hardwareVersion = (_cleanString5 = cleanString(host.hardwareVersion, 40)) !== null && _cleanString5 !== void 0 ? _cleanString5 : bridge.hardwareVersion;
|
|
1528
1545
|
var sonifiModel = model && category === "Samsung TV" && !/^SAMSUNG-IPTV-/i.test(model) ? "SAMSUNG-IPTV-".concat(model) : model;
|
|
1529
1546
|
return _object_spread_props(_object_spread({
|
|
1530
1547
|
category: category,
|
|
1531
1548
|
categoryCode: CATEGORY_CODES[category]
|
|
1532
|
-
},
|
|
1549
|
+
}, make ? {
|
|
1550
|
+
make: make
|
|
1551
|
+
} : {}, model ? {
|
|
1533
1552
|
model: model
|
|
1553
|
+
} : {}, hardwareVersion ? {
|
|
1554
|
+
hardwareVersion: hardwareVersion
|
|
1534
1555
|
} : {}, sonifiModel ? {
|
|
1535
1556
|
sonifiModel: sonifiModel
|
|
1536
1557
|
} : {}, firmware ? {
|
|
@@ -2218,15 +2239,20 @@ function finalizeGamRequestUrl(rawUrl, ctx) {
|
|
|
2218
2239
|
values.set("PMND", String(pod.pmnd));
|
|
2219
2240
|
values.set("PMXD", String(pod.pmxd));
|
|
2220
2241
|
if (pod.pmad != null) values.set("PMAD", String(pod.pmad));
|
|
2242
|
+
values.set("MABD", String(Math.max(1, Math.floor(pod.pmxd / 1e3))));
|
|
2221
2243
|
}
|
|
2222
2244
|
var substituted = substituteScvpMacros(rawUrl, values);
|
|
2223
2245
|
var finalUrl;
|
|
2224
2246
|
try {
|
|
2225
2247
|
var url = new URL(normalizeVastTagUrl(substituted.url));
|
|
2248
|
+
var isGam = GAM_AD_HOSTS.has(url.hostname);
|
|
2249
|
+
var setPodParam = function setPodParam(key, value) {
|
|
2250
|
+
if (isGam || url.searchParams.has(key)) url.searchParams.set(key, String(value));
|
|
2251
|
+
};
|
|
2226
2252
|
if (pod) {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
if (pod.pmad != null)
|
|
2253
|
+
setPodParam("pmnd", pod.pmnd);
|
|
2254
|
+
setPodParam("pmxd", pod.pmxd);
|
|
2255
|
+
if (pod.pmad != null) setPodParam("pmad", pod.pmad);
|
|
2230
2256
|
else url.searchParams.delete("pmad");
|
|
2231
2257
|
} else {
|
|
2232
2258
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -2292,7 +2318,9 @@ function validateGamRequestUrl(url, expect) {
|
|
|
2292
2318
|
if (leftover.length > 0) problems.push("unresolved SCVP macros: ".concat(leftover.join(", ")));
|
|
2293
2319
|
var params;
|
|
2294
2320
|
try {
|
|
2295
|
-
|
|
2321
|
+
var parsed = new URL(url);
|
|
2322
|
+
if (!GAM_AD_HOSTS.has(parsed.hostname)) return problems;
|
|
2323
|
+
params = parsed.searchParams;
|
|
2296
2324
|
} catch (unused) {
|
|
2297
2325
|
return problems.concat("URL could not be parsed");
|
|
2298
2326
|
}
|