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.
Files changed (59) hide show
  1. package/dist/stormcloud-vp.min.js +2 -2
  2. package/lib/Player.d.cts +2 -1
  3. package/lib/StormcloudPlayer.cjs +452 -139
  4. package/lib/StormcloudPlayer.cjs.map +1 -1
  5. package/lib/StormcloudPlayer.d.cts +1 -0
  6. package/lib/index.cjs +478 -140
  7. package/lib/index.cjs.map +1 -1
  8. package/lib/index.d.cts +1 -0
  9. package/lib/index.d.ts +30 -5
  10. package/lib/index.js +478 -140
  11. package/lib/index.js.map +1 -1
  12. package/lib/player/AdBreakOrchestrator.cjs +37 -9
  13. package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
  14. package/lib/player/AdBreakOrchestrator.d.cts +1 -0
  15. package/lib/player/AdConfigManager.cjs +408 -123
  16. package/lib/player/AdConfigManager.cjs.map +1 -1
  17. package/lib/player/AdConfigManager.d.cts +2 -0
  18. package/lib/player/AdTimingService.d.cts +1 -0
  19. package/lib/player/EdgePodRequest.d.cts +1 -0
  20. package/lib/player/FloorLadder.d.cts +1 -0
  21. package/lib/player/HlsEngine.d.cts +1 -0
  22. package/lib/player/OptimizedPodRequest.cjs +17 -5
  23. package/lib/player/OptimizedPodRequest.cjs.map +1 -1
  24. package/lib/player/PlayerControls.d.cts +1 -0
  25. package/lib/player/Scte35CueManager.d.cts +1 -0
  26. package/lib/player/Scte35Parser.d.cts +1 -0
  27. package/lib/player/StormcloudVideoPlayer.cjs +452 -139
  28. package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
  29. package/lib/player/StormcloudVideoPlayer.d.cts +5 -4
  30. package/lib/player/playerTypes.d.cts +1 -0
  31. package/lib/players/HlsPlayer.cjs +452 -139
  32. package/lib/players/HlsPlayer.cjs.map +1 -1
  33. package/lib/players/HlsPlayer.d.cts +1 -0
  34. package/lib/players/index.cjs +452 -139
  35. package/lib/players/index.cjs.map +1 -1
  36. package/lib/props.d.cts +1 -0
  37. package/lib/sdk/hlsAdPlayer.d.cts +1 -0
  38. package/lib/types.d.cts +7 -1
  39. package/lib/ui/StormcloudVideoPlayer.cjs +478 -140
  40. package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
  41. package/lib/ui/StormcloudVideoPlayer.d.cts +1 -0
  42. package/lib/utils/__tests__/adSignals.test.cjs +169 -14
  43. package/lib/utils/__tests__/adSignals.test.cjs.map +1 -1
  44. package/lib/utils/contentMetadata.cjs +120 -4
  45. package/lib/utils/contentMetadata.cjs.map +1 -1
  46. package/lib/utils/contentMetadata.d.cts +37 -1
  47. package/lib/utils/deviceInfo.cjs +24 -4
  48. package/lib/utils/deviceInfo.cjs.map +1 -1
  49. package/lib/utils/deviceInfo.d.cts +3 -0
  50. package/lib/utils/partnerSignals.cjs +294 -0
  51. package/lib/utils/partnerSignals.cjs.map +1 -0
  52. package/lib/utils/partnerSignals.d.cts +12 -0
  53. package/lib/utils/tracking.cjs +24 -4
  54. package/lib/utils/tracking.cjs.map +1 -1
  55. package/lib/utils/tracking.d.cts +1 -0
  56. package/lib/utils/vastMacros.cjs +51 -1
  57. package/lib/utils/vastMacros.cjs.map +1 -1
  58. package/lib/utils/vastMacros.d.cts +20 -0
  59. package/package.json +1 -1
@@ -1247,6 +1247,308 @@ function normalizeBoolean(value) {
1247
1247
  }
1248
1248
  return void 0;
1249
1249
  }
1250
+ // src/utils/contentMetadata.ts
1251
+ var MAX_CONTENT_VALUE_LENGTH = 128;
1252
+ var BRIDGE_KEYS = {
1253
+ channelName: [
1254
+ "channelName",
1255
+ "ct_ch"
1256
+ ],
1257
+ programTitle: [
1258
+ "programTitle",
1259
+ "ct_ti"
1260
+ ],
1261
+ contentNetwork: [
1262
+ "contentNetwork",
1263
+ "ct_ne"
1264
+ ],
1265
+ contentType: [
1266
+ "contentType",
1267
+ "ctt"
1268
+ ],
1269
+ contentCategory: [
1270
+ "contentCategory",
1271
+ "ctc"
1272
+ ],
1273
+ contentGenre: [
1274
+ "contentGenre",
1275
+ "ctgr"
1276
+ ],
1277
+ contentLanguage: [
1278
+ "contentLanguage",
1279
+ "ctlg"
1280
+ ],
1281
+ contentDuration: [
1282
+ "contentDuration",
1283
+ "ctd"
1284
+ ],
1285
+ contentSeason: [
1286
+ "contentSeason",
1287
+ "cts"
1288
+ ],
1289
+ contentEpisode: [
1290
+ "contentEpisode",
1291
+ "cte"
1292
+ ],
1293
+ contentRating: [
1294
+ "contentRating",
1295
+ "ctr"
1296
+ ],
1297
+ contentId: [
1298
+ "contentId",
1299
+ "ctid"
1300
+ ]
1301
+ };
1302
+ function sanitizeContentValue(value) {
1303
+ if (typeof value !== "string") return void 0;
1304
+ var cleaned = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
1305
+ if (!cleaned) return void 0;
1306
+ if (/^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%|\$\{[^}]+\})$/.test(cleaned)) return void 0;
1307
+ if (/^(unknown|null|undefined|none|n\/a|-)$/i.test(cleaned)) return void 0;
1308
+ return cleaned.length > MAX_CONTENT_VALUE_LENGTH ? cleaned.slice(0, MAX_CONTENT_VALUE_LENGTH).trim() : cleaned;
1309
+ }
1310
+ function sanitizeContentScalar(value) {
1311
+ if (typeof value === "number") {
1312
+ return Number.isFinite(value) ? String(value) : void 0;
1313
+ }
1314
+ return sanitizeContentValue(value);
1315
+ }
1316
+ function normalizeContentLanguage(value) {
1317
+ var cleaned = sanitizeContentValue(value);
1318
+ if (!cleaned) return void 0;
1319
+ var match = cleaned.match(/^([A-Za-z]{2})(?:[-_][A-Za-z0-9]{1,8})*$/);
1320
+ return match && match[1] ? match[1].toLowerCase() : void 0;
1321
+ }
1322
+ function normalizeContentDuration(value) {
1323
+ var raw = sanitizeContentScalar(value);
1324
+ if (raw == null || !/^-?\d+(\.\d+)?$/.test(raw)) return void 0;
1325
+ var seconds = Number(raw);
1326
+ if (seconds === -1) return -1;
1327
+ return seconds > 0 ? Math.round(seconds) : void 0;
1328
+ }
1329
+ function bridgeSources() {
1330
+ if (typeof window === "undefined") return [];
1331
+ var w = window;
1332
+ return [
1333
+ w.__STORMCLOUD_CTV__,
1334
+ w.__STORMCLOUD_CTV_AD_INFO__,
1335
+ w.stormcloudCtv
1336
+ ].filter(Boolean);
1337
+ }
1338
+ function readBridgeValue2(keys, sanitize) {
1339
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1340
+ try {
1341
+ for(var _iterator = bridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1342
+ var source = _step.value;
1343
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
1344
+ try {
1345
+ for(var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
1346
+ var key = _step1.value;
1347
+ var value = void 0;
1348
+ try {
1349
+ value = source === null || source === void 0 ? void 0 : source[key];
1350
+ if (typeof value === "function") value = value.call(source);
1351
+ } catch (unused) {
1352
+ value = void 0;
1353
+ }
1354
+ var sanitized = sanitize(value);
1355
+ if (sanitized != null) return sanitized;
1356
+ }
1357
+ } catch (err) {
1358
+ _didIteratorError1 = true;
1359
+ _iteratorError1 = err;
1360
+ } finally{
1361
+ try {
1362
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
1363
+ _iterator1.return();
1364
+ }
1365
+ } finally{
1366
+ if (_didIteratorError1) {
1367
+ throw _iteratorError1;
1368
+ }
1369
+ }
1370
+ }
1371
+ }
1372
+ } catch (err) {
1373
+ _didIteratorError = true;
1374
+ _iteratorError = err;
1375
+ } finally{
1376
+ try {
1377
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1378
+ _iterator.return();
1379
+ }
1380
+ } finally{
1381
+ if (_didIteratorError) {
1382
+ throw _iteratorError;
1383
+ }
1384
+ }
1385
+ }
1386
+ return void 0;
1387
+ }
1388
+ function readBridgeContentValue(keys) {
1389
+ return readBridgeValue2(keys, sanitizeContentValue);
1390
+ }
1391
+ function resolveContentMetadata(config) {
1392
+ var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2, _config_contentDetails, _sanitizeContentValue3, _sanitizeContentValue4, _sanitizeContentValue5, _normalizeContentLanguage, _normalizeContentDuration, _sanitizeContentScalar, _sanitizeContentScalar1, _sanitizeContentValue6, _sanitizeContentValue7;
1393
+ var channelName = (_sanitizeContentValue = sanitizeContentValue(config.channelName)) !== null && _sanitizeContentValue !== void 0 ? _sanitizeContentValue : readBridgeContentValue(BRIDGE_KEYS.channelName);
1394
+ var programTitle = (_sanitizeContentValue1 = sanitizeContentValue(config.programTitle)) !== null && _sanitizeContentValue1 !== void 0 ? _sanitizeContentValue1 : readBridgeContentValue(BRIDGE_KEYS.programTitle);
1395
+ var contentNetwork = (_sanitizeContentValue2 = sanitizeContentValue(config.contentNetwork)) !== null && _sanitizeContentValue2 !== void 0 ? _sanitizeContentValue2 : readBridgeContentValue(BRIDGE_KEYS.contentNetwork);
1396
+ var details = (_config_contentDetails = config.contentDetails) !== null && _config_contentDetails !== void 0 ? _config_contentDetails : {};
1397
+ var contentType = (_sanitizeContentValue3 = sanitizeContentValue(details.contentType)) !== null && _sanitizeContentValue3 !== void 0 ? _sanitizeContentValue3 : readBridgeContentValue(BRIDGE_KEYS.contentType);
1398
+ var contentCategory = (_sanitizeContentValue4 = sanitizeContentValue(details.category)) !== null && _sanitizeContentValue4 !== void 0 ? _sanitizeContentValue4 : readBridgeContentValue(BRIDGE_KEYS.contentCategory);
1399
+ var contentGenre = (_sanitizeContentValue5 = sanitizeContentValue(details.genre)) !== null && _sanitizeContentValue5 !== void 0 ? _sanitizeContentValue5 : readBridgeContentValue(BRIDGE_KEYS.contentGenre);
1400
+ var contentLanguage = (_normalizeContentLanguage = normalizeContentLanguage(details.language)) !== null && _normalizeContentLanguage !== void 0 ? _normalizeContentLanguage : readBridgeValue2(BRIDGE_KEYS.contentLanguage, normalizeContentLanguage);
1401
+ var contentDurationSeconds = (_normalizeContentDuration = normalizeContentDuration(details.durationSeconds)) !== null && _normalizeContentDuration !== void 0 ? _normalizeContentDuration : readBridgeValue2(BRIDGE_KEYS.contentDuration, normalizeContentDuration);
1402
+ var contentSeason = (_sanitizeContentScalar = sanitizeContentScalar(details.season)) !== null && _sanitizeContentScalar !== void 0 ? _sanitizeContentScalar : readBridgeValue2(BRIDGE_KEYS.contentSeason, sanitizeContentScalar);
1403
+ var contentEpisode = (_sanitizeContentScalar1 = sanitizeContentScalar(details.episode)) !== null && _sanitizeContentScalar1 !== void 0 ? _sanitizeContentScalar1 : readBridgeValue2(BRIDGE_KEYS.contentEpisode, sanitizeContentScalar);
1404
+ var contentRating = (_sanitizeContentValue6 = sanitizeContentValue(details.rating)) !== null && _sanitizeContentValue6 !== void 0 ? _sanitizeContentValue6 : readBridgeContentValue(BRIDGE_KEYS.contentRating);
1405
+ var contentId = (_sanitizeContentValue7 = sanitizeContentValue(details.contentId)) !== null && _sanitizeContentValue7 !== void 0 ? _sanitizeContentValue7 : readBridgeContentValue(BRIDGE_KEYS.contentId);
1406
+ return _object_spread({}, channelName ? {
1407
+ channelName: channelName
1408
+ } : {}, programTitle ? {
1409
+ programTitle: programTitle
1410
+ } : {}, contentNetwork ? {
1411
+ contentNetwork: contentNetwork
1412
+ } : {}, contentType ? {
1413
+ contentType: contentType
1414
+ } : {}, contentCategory ? {
1415
+ contentCategory: contentCategory
1416
+ } : {}, contentGenre ? {
1417
+ contentGenre: contentGenre
1418
+ } : {}, contentLanguage ? {
1419
+ contentLanguage: contentLanguage
1420
+ } : {}, contentDurationSeconds != null ? {
1421
+ contentDurationSeconds: contentDurationSeconds
1422
+ } : {}, contentSeason ? {
1423
+ contentSeason: contentSeason
1424
+ } : {}, contentEpisode ? {
1425
+ contentEpisode: contentEpisode
1426
+ } : {}, contentRating ? {
1427
+ contentRating: contentRating
1428
+ } : {}, contentId ? {
1429
+ contentId: contentId
1430
+ } : {});
1431
+ }
1432
+ function applyContentMetadataUpdate(target, meta) {
1433
+ var apply = function apply(key, value) {
1434
+ if (value === void 0) return;
1435
+ var clean = value === null ? void 0 : sanitizeContentValue(value);
1436
+ if (clean) target[key] = clean;
1437
+ else delete target[key];
1438
+ };
1439
+ apply("channelName", meta.channelName);
1440
+ apply("programTitle", meta.programTitle);
1441
+ apply("contentNetwork", meta.contentNetwork);
1442
+ if (meta.details === void 0) return;
1443
+ if (meta.details === null) delete target.contentDetails;
1444
+ else target.contentDetails = _object_spread({}, meta.details);
1445
+ }
1446
+ function appendMissingContentParams(url, meta) {
1447
+ if (!meta.channelName && !meta.programTitle && !meta.contentNetwork) return url;
1448
+ try {
1449
+ var parsed = new URL(url);
1450
+ var add = function add(key, value) {
1451
+ if (value && !parsed.searchParams.has(key)) parsed.searchParams.set(key, value);
1452
+ };
1453
+ add("ct_ch", meta.channelName);
1454
+ add("ct_ti", meta.programTitle);
1455
+ add("ct_ne", meta.contentNetwork);
1456
+ return parsed.toString();
1457
+ } catch (unused) {
1458
+ return url;
1459
+ }
1460
+ }
1461
+ // src/utils/partnerSignals.ts
1462
+ var PLATFORM_IFA_TYPES = /* @__PURE__ */ new Set([
1463
+ "aaid",
1464
+ "adid",
1465
+ "afai",
1466
+ "idfa",
1467
+ "lgudid",
1468
+ "msai",
1469
+ "rida",
1470
+ "tifa",
1471
+ "tvos",
1472
+ "vaid",
1473
+ "vida"
1474
+ ]);
1475
+ function toIabIfaType(deviceIdType, source) {
1476
+ if (!deviceIdType) return void 0;
1477
+ var type = deviceIdType.trim().toLowerCase();
1478
+ if (source === "generated") return "sessionid";
1479
+ if (PLATFORM_IFA_TYPES.has(type)) return type;
1480
+ if (source === "platform") return "dpid";
1481
+ return "ppid";
1482
+ }
1483
+ function playbackMethodCode(autoPlay, muted) {
1484
+ if (autoPlay === false) return 3;
1485
+ if (autoPlay !== true || muted == null) return void 0;
1486
+ return muted ? 2 : 1;
1487
+ }
1488
+ function resolvePlayerSize(video) {
1489
+ var width = video ? video.clientWidth : 0;
1490
+ var height = video ? video.clientHeight : 0;
1491
+ if (!(width > 0 && height > 0) && typeof window !== "undefined") {
1492
+ width = window.innerWidth;
1493
+ height = window.innerHeight;
1494
+ }
1495
+ if (!(width > 0 && height > 0)) return {};
1496
+ return {
1497
+ width: Math.round(width),
1498
+ height: Math.round(height)
1499
+ };
1500
+ }
1501
+ function sanitizeUserId(value) {
1502
+ var cleaned = sanitizeContentValue(value);
1503
+ if (!cleaned || /\s/.test(cleaned)) return void 0;
1504
+ return cleaned;
1505
+ }
1506
+ function isPublicIpv4(ip) {
1507
+ var parts = ip.split(".");
1508
+ if (parts.length !== 4) return false;
1509
+ var nums = parts.map(function(p) {
1510
+ return /^\d{1,3}$/.test(p) ? Number(p) : NaN;
1511
+ });
1512
+ if (nums.some(function(n) {
1513
+ return !(n >= 0 && n <= 255);
1514
+ })) return false;
1515
+ var _nums = _sliced_to_array(nums, 2), a = _nums[0], b = _nums[1];
1516
+ if (a === 0 || a === 10 || a === 127 || a >= 224) return false;
1517
+ if (a === 100 && b >= 64 && b <= 127) return false;
1518
+ if (a === 169 && b === 254) return false;
1519
+ if (a === 172 && b >= 16 && b <= 31) return false;
1520
+ if (a === 192 && b === 168) return false;
1521
+ return true;
1522
+ }
1523
+ function isPublicIpv6(ip) {
1524
+ var lower = ip.toLowerCase();
1525
+ if (!/^[0-9a-f:]+$/.test(lower) || lower.split(":").length < 3) return false;
1526
+ if (lower === "::" || lower === "::1") return false;
1527
+ if (/^fe[89ab]/.test(lower)) return false;
1528
+ if (/^f[cd]/.test(lower)) return false;
1529
+ return true;
1530
+ }
1531
+ function sanitizePublicIp(value) {
1532
+ var cleaned = sanitizeContentValue(value);
1533
+ if (!cleaned) return void 0;
1534
+ if (cleaned.includes(".")) return isPublicIpv4(cleaned) ? cleaned : void 0;
1535
+ return isPublicIpv6(cleaned) ? cleaned : void 0;
1536
+ }
1537
+ function resolveUserId(configValue) {
1538
+ var _sanitizeUserId;
1539
+ return (_sanitizeUserId = sanitizeUserId(configValue)) !== null && _sanitizeUserId !== void 0 ? _sanitizeUserId : readBridgeValue2([
1540
+ "userId",
1541
+ "uid"
1542
+ ], sanitizeUserId);
1543
+ }
1544
+ function resolveClientIp(configValue) {
1545
+ var _sanitizePublicIp;
1546
+ return (_sanitizePublicIp = sanitizePublicIp(configValue)) !== null && _sanitizePublicIp !== void 0 ? _sanitizePublicIp : readBridgeValue2([
1547
+ "ipAddress",
1548
+ "clientIp",
1549
+ "ip"
1550
+ ], sanitizePublicIp);
1551
+ }
1250
1552
  // src/utils/vastMacros.ts
1251
1553
  var UNEXPANDED_MACRO_PATTERN = /^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%)$/;
1252
1554
  var INVALID_VAST_PARAM_KEY = /^\s|\s$/;
@@ -1564,7 +1866,8 @@ var NESTED_QUERY_PARAM_KEYS = /* @__PURE__ */ new Set([
1564
1866
  var SCVP_POD_MACROS = /* @__PURE__ */ new Set([
1565
1867
  "PMND",
1566
1868
  "PMXD",
1567
- "PMAD"
1869
+ "PMAD",
1870
+ "MABD"
1568
1871
  ]);
1569
1872
  function hasScvpMacros(url) {
1570
1873
  return !!url && SCVP_MACRO_DETECT.test(url);
@@ -1609,6 +1912,8 @@ function resolveScvpMacroValues(ctx) {
1609
1912
  set("RDID", deviceId);
1610
1913
  set("IDTYPE", deviceIdType);
1611
1914
  set("IS-LAT", (_toFlag = toFlag(ctx.limitAdTracking)) !== null && _toFlag !== void 0 ? _toFlag : "0");
1915
+ set("IFA", deviceId);
1916
+ set("IFA-TYPE", toIabIfaType(deviceIdType, ctx.deviceIdSource));
1612
1917
  }
1613
1918
  set("SID", ctx.sessionId);
1614
1919
  set("DTH", ctx.deviceTypeHint);
@@ -1626,6 +1931,26 @@ function resolveScvpMacroValues(ctx) {
1626
1931
  set("GDPR", (_ctx_consent = ctx.consent) === null || _ctx_consent === void 0 ? void 0 : _ctx_consent.gdpr);
1627
1932
  set("GDPR-CONSENT", (_ctx_consent1 = ctx.consent) === null || _ctx_consent1 === void 0 ? void 0 : _ctx_consent1.gdprConsent);
1628
1933
  set("US-PRIVACY", (_ctx_consent2 = ctx.consent) === null || _ctx_consent2 === void 0 ? void 0 : _ctx_consent2.usPrivacy);
1934
+ set("PLAYER-WIDTH", ctx.playerWidth);
1935
+ set("PLAYER-HEIGHT", ctx.playerHeight);
1936
+ set("TIMESTAMP", ctx.timestamp);
1937
+ set("LIVE", toFlag(ctx.isLive));
1938
+ set("VPMT", playbackMethodCode(ctx.isCtv ? true : ctx.adWillAutoPlay, ctx.adWillPlayMuted));
1939
+ set("DEVICE-MAKE", ctx.deviceMake);
1940
+ set("DEVICE-MODEL", ctx.deviceModel);
1941
+ set("DEVICE-HWV", ctx.deviceHardwareVersion);
1942
+ set("UA", ctx.userAgent);
1943
+ set("IP", ctx.ipAddress);
1944
+ set("UID", ctx.userId);
1945
+ set("CT-TYPE", ctx.contentType);
1946
+ set("CT-CATEGORY", ctx.contentCategory);
1947
+ set("CT-GENRE", ctx.contentGenre);
1948
+ set("CT-LANGUAGE", ctx.contentLanguage);
1949
+ set("CT-DURATION", ctx.contentDurationSeconds != null ? ctx.contentDurationSeconds : ctx.isLive ? -1 : void 0);
1950
+ set("CT-SEASON", ctx.contentSeason);
1951
+ set("CT-EPISODE", ctx.contentEpisode);
1952
+ set("CT-RATING", ctx.contentRating);
1953
+ set("CT-ID", ctx.contentId);
1629
1954
  return values;
1630
1955
  }
1631
1956
  var keepNone = function keepNone() {
@@ -2841,15 +3166,20 @@ function finalizeGamRequestUrl(rawUrl, ctx) {
2841
3166
  values.set("PMND", String(pod.pmnd));
2842
3167
  values.set("PMXD", String(pod.pmxd));
2843
3168
  if (pod.pmad != null) values.set("PMAD", String(pod.pmad));
3169
+ values.set("MABD", String(Math.max(1, Math.floor(pod.pmxd / 1e3))));
2844
3170
  }
2845
3171
  var substituted = substituteScvpMacros(rawUrl, values);
2846
3172
  var finalUrl;
2847
3173
  try {
2848
3174
  var url = new URL(normalizeVastTagUrl(substituted.url));
3175
+ var isGam = GAM_AD_HOSTS.has(url.hostname);
3176
+ var setPodParam = function setPodParam(key, value) {
3177
+ if (isGam || url.searchParams.has(key)) url.searchParams.set(key, String(value));
3178
+ };
2849
3179
  if (pod) {
2850
- url.searchParams.set("pmnd", String(pod.pmnd));
2851
- url.searchParams.set("pmxd", String(pod.pmxd));
2852
- if (pod.pmad != null) url.searchParams.set("pmad", String(pod.pmad));
3180
+ setPodParam("pmnd", pod.pmnd);
3181
+ setPodParam("pmxd", pod.pmxd);
3182
+ if (pod.pmad != null) setPodParam("pmad", pod.pmad);
2853
3183
  else url.searchParams.delete("pmad");
2854
3184
  } else {
2855
3185
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -2915,7 +3245,9 @@ function validateGamRequestUrl(url, expect) {
2915
3245
  if (leftover.length > 0) problems.push("unresolved SCVP macros: ".concat(leftover.join(", ")));
2916
3246
  var params;
2917
3247
  try {
2918
- params = new URL(url).searchParams;
3248
+ var parsed = new URL(url);
3249
+ if (!GAM_AD_HOSTS.has(parsed.hostname)) return problems;
3250
+ params = parsed.searchParams;
2919
3251
  } catch (unused) {
2920
3252
  return problems.concat("URL could not be parsed");
2921
3253
  }
@@ -6336,7 +6668,7 @@ function safeCall2(fn, thisArg) {
6336
6668
  function userAgent() {
6337
6669
  return typeof navigator !== "undefined" ? navigator.userAgent || "" : "";
6338
6670
  }
6339
- function bridgeSources() {
6671
+ function bridgeSources2() {
6340
6672
  if (typeof window === "undefined") return [];
6341
6673
  var w = window;
6342
6674
  return [
@@ -6348,7 +6680,7 @@ function bridgeSources() {
6348
6680
  function readBridge(keys) {
6349
6681
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
6350
6682
  try {
6351
- for(var _iterator = bridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6683
+ for(var _iterator = bridgeSources2()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6352
6684
  var source = _step.value;
6353
6685
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
6354
6686
  try {
@@ -6395,6 +6727,11 @@ function readBridge(keys) {
6395
6727
  }
6396
6728
  return void 0;
6397
6729
  }
6730
+ function makeForCategory(category) {
6731
+ if (category === "LG TV" || category === "LG Set-Top Box") return "LG";
6732
+ if (category === "Samsung TV") return "Samsung";
6733
+ return void 0;
6734
+ }
6398
6735
  function normalizeCategory(value) {
6399
6736
  var v = cleanString(value);
6400
6737
  if (!v) return void 0;
@@ -6542,7 +6879,7 @@ function primeDeviceInfo() {
6542
6879
  return primePromise;
6543
6880
  }
6544
6881
  function getDeviceInfo() {
6545
- var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory;
6882
+ var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory, _ref3, _cleanString4, _cleanString5;
6546
6883
  var platform = platformCache !== null && platformCache !== void 0 ? platformCache : computePlatformInfo();
6547
6884
  if (primePromise && !platformCache) {} else {
6548
6885
  platformCache = platform;
@@ -6565,7 +6902,14 @@ function getDeviceInfo() {
6565
6902
  ]),
6566
6903
  category: normalizeCategory(readBridge([
6567
6904
  "deviceCategory"
6568
- ]))
6905
+ ])),
6906
+ make: readBridge([
6907
+ "deviceMake"
6908
+ ]),
6909
+ hardwareVersion: readBridge([
6910
+ "deviceHardwareVersion",
6911
+ "hardwareVersion"
6912
+ ])
6569
6913
  };
6570
6914
  var terminalId = (_cleanString = cleanString(host.terminalId)) !== null && _cleanString !== void 0 ? _cleanString : bridge.terminalId;
6571
6915
  var hostInternalId = (_cleanString1 = cleanString(host.internalDeviceId)) !== null && _cleanString1 !== void 0 ? _cleanString1 : bridge.internalDeviceId;
@@ -6578,7 +6922,9 @@ function getDeviceInfo() {
6578
6922
  bridge.internalDeviceId,
6579
6923
  bridge.model,
6580
6924
  bridge.firmware,
6581
- bridge.category
6925
+ bridge.category,
6926
+ bridge.make,
6927
+ bridge.hardwareVersion
6582
6928
  ];
6583
6929
  if (bridgeValues.some(function(v) {
6584
6930
  return v !== void 0;
@@ -6586,12 +6932,18 @@ function getDeviceInfo() {
6586
6932
  if (hostDeviceInfo) sources.unshift("host");
6587
6933
  var internalDeviceId = hostInternalId !== null && hostInternalId !== void 0 ? hostInternalId : platform.internalDeviceId;
6588
6934
  var internalDeviceIdSource = hostInternalId ? "host" : platform.internalDeviceIdSource;
6935
+ var make = (_ref3 = (_cleanString4 = cleanString(host.make, 40)) !== null && _cleanString4 !== void 0 ? _cleanString4 : bridge.make) !== null && _ref3 !== void 0 ? _ref3 : makeForCategory(category);
6936
+ var hardwareVersion = (_cleanString5 = cleanString(host.hardwareVersion, 40)) !== null && _cleanString5 !== void 0 ? _cleanString5 : bridge.hardwareVersion;
6589
6937
  var sonifiModel = model && category === "Samsung TV" && !/^SAMSUNG-IPTV-/i.test(model) ? "SAMSUNG-IPTV-".concat(model) : model;
6590
6938
  return _object_spread_props(_object_spread({
6591
6939
  category: category,
6592
6940
  categoryCode: CATEGORY_CODES[category]
6593
- }, model ? {
6941
+ }, make ? {
6942
+ make: make
6943
+ } : {}, model ? {
6594
6944
  model: model
6945
+ } : {}, hardwareVersion ? {
6946
+ hardwareVersion: hardwareVersion
6595
6947
  } : {}, sonifiModel ? {
6596
6948
  sonifiModel: sonifiModel
6597
6949
  } : {}, firmware ? {
@@ -6682,117 +7034,6 @@ function deviceInfoAnalyticsFields(info) {
6682
7034
  terminal_id: info.terminalId
6683
7035
  } : {});
6684
7036
  }
6685
- // src/utils/contentMetadata.ts
6686
- var MAX_CONTENT_VALUE_LENGTH = 128;
6687
- var BRIDGE_KEYS = {
6688
- channelName: [
6689
- "channelName",
6690
- "ct_ch"
6691
- ],
6692
- programTitle: [
6693
- "programTitle",
6694
- "ct_ti"
6695
- ],
6696
- contentNetwork: [
6697
- "contentNetwork",
6698
- "ct_ne"
6699
- ]
6700
- };
6701
- function sanitizeContentValue(value) {
6702
- if (typeof value !== "string") return void 0;
6703
- var cleaned = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
6704
- if (!cleaned) return void 0;
6705
- if (/^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%|\$\{[^}]+\})$/.test(cleaned)) return void 0;
6706
- if (/^(unknown|null|undefined|none|n\/a|-)$/i.test(cleaned)) return void 0;
6707
- return cleaned.length > MAX_CONTENT_VALUE_LENGTH ? cleaned.slice(0, MAX_CONTENT_VALUE_LENGTH).trim() : cleaned;
6708
- }
6709
- function bridgeSources2() {
6710
- if (typeof window === "undefined") return [];
6711
- var w = window;
6712
- return [
6713
- w.__STORMCLOUD_CTV__,
6714
- w.__STORMCLOUD_CTV_AD_INFO__,
6715
- w.stormcloudCtv
6716
- ].filter(Boolean);
6717
- }
6718
- function readBridgeContentValue(keys) {
6719
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
6720
- try {
6721
- for(var _iterator = bridgeSources2()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6722
- var source = _step.value;
6723
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
6724
- try {
6725
- for(var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
6726
- var key = _step1.value;
6727
- var value = void 0;
6728
- try {
6729
- value = source === null || source === void 0 ? void 0 : source[key];
6730
- if (typeof value === "function") value = value.call(source);
6731
- } catch (unused) {
6732
- value = void 0;
6733
- }
6734
- var sanitized = sanitizeContentValue(value);
6735
- if (sanitized) return sanitized;
6736
- }
6737
- } catch (err) {
6738
- _didIteratorError1 = true;
6739
- _iteratorError1 = err;
6740
- } finally{
6741
- try {
6742
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
6743
- _iterator1.return();
6744
- }
6745
- } finally{
6746
- if (_didIteratorError1) {
6747
- throw _iteratorError1;
6748
- }
6749
- }
6750
- }
6751
- }
6752
- } catch (err) {
6753
- _didIteratorError = true;
6754
- _iteratorError = err;
6755
- } finally{
6756
- try {
6757
- if (!_iteratorNormalCompletion && _iterator.return != null) {
6758
- _iterator.return();
6759
- }
6760
- } finally{
6761
- if (_didIteratorError) {
6762
- throw _iteratorError;
6763
- }
6764
- }
6765
- }
6766
- return void 0;
6767
- }
6768
- function resolveContentMetadata(config) {
6769
- var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2;
6770
- var channelName = (_sanitizeContentValue = sanitizeContentValue(config.channelName)) !== null && _sanitizeContentValue !== void 0 ? _sanitizeContentValue : readBridgeContentValue(BRIDGE_KEYS.channelName);
6771
- var programTitle = (_sanitizeContentValue1 = sanitizeContentValue(config.programTitle)) !== null && _sanitizeContentValue1 !== void 0 ? _sanitizeContentValue1 : readBridgeContentValue(BRIDGE_KEYS.programTitle);
6772
- var contentNetwork = (_sanitizeContentValue2 = sanitizeContentValue(config.contentNetwork)) !== null && _sanitizeContentValue2 !== void 0 ? _sanitizeContentValue2 : readBridgeContentValue(BRIDGE_KEYS.contentNetwork);
6773
- return _object_spread({}, channelName ? {
6774
- channelName: channelName
6775
- } : {}, programTitle ? {
6776
- programTitle: programTitle
6777
- } : {}, contentNetwork ? {
6778
- contentNetwork: contentNetwork
6779
- } : {});
6780
- }
6781
- function appendMissingContentParams(url, meta) {
6782
- if (!meta.channelName && !meta.programTitle && !meta.contentNetwork) return url;
6783
- try {
6784
- var parsed = new URL(url);
6785
- var add = function add(key, value) {
6786
- if (value && !parsed.searchParams.has(key)) parsed.searchParams.set(key, value);
6787
- };
6788
- add("ct_ch", meta.channelName);
6789
- add("ct_ti", meta.programTitle);
6790
- add("ct_ne", meta.contentNetwork);
6791
- return parsed.toString();
6792
- } catch (unused) {
6793
- return url;
6794
- }
6795
- }
6796
7037
  // src/utils/screenActivity.ts
6797
7038
  var hostStandby = false;
6798
7039
  function setHostStandby(standby) {
@@ -8794,6 +9035,13 @@ var Scte35CueManager = /*#__PURE__*/ function() {
8794
9035
  return Scte35CueManager;
8795
9036
  }();
8796
9037
  // src/player/AdConfigManager.ts
9038
+ function isGamAdUrl(rawUrl) {
9039
+ try {
9040
+ return GAM_AD_HOSTS.has(new URL(rawUrl).hostname);
9041
+ } catch (unused) {
9042
+ return false;
9043
+ }
9044
+ }
8797
9045
  function withDeferredPodParams(rawUrl, deferNonce) {
8798
9046
  try {
8799
9047
  var url = new URL(rawUrl);
@@ -8811,11 +9059,15 @@ function withDeferredPodParams(rawUrl, deferNonce) {
8811
9059
  }
8812
9060
  var AdConfigManager = /*#__PURE__*/ function() {
8813
9061
  function AdConfigManager(config, video) {
9062
+ var _this = this;
8814
9063
  _class_call_check(this, AdConfigManager);
8815
9064
  this.vmapBreaks = [];
8816
9065
  this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
8817
9066
  this.streamCorrelator = generateCorrelator();
8818
9067
  this.consentSignals = {};
9068
+ this.isLiveStream = function() {
9069
+ return !!_this.config.isLiveStream;
9070
+ };
8819
9071
  this.podCounter = 0;
8820
9072
  this.podAssignedByPrefetch = false;
8821
9073
  this.lastHeartbeatTime = 0;
@@ -9266,13 +9518,22 @@ var AdConfigManager = /*#__PURE__*/ function() {
9266
9518
  {
9267
9519
  key: "generatePodVastUrl",
9268
9520
  value: function generatePodVastUrl(baseUrl, adPlayer, palNonce, inAdBreak) {
9521
+ var _content_contentDurationSeconds;
9269
9522
  var adWillPlayMuted = inAdBreak ? adPlayer.getOriginalMutedState() : this.video.muted;
9270
9523
  var envSignals = resolveVastEnvironmentSignals(!!this.config.ctvAdRequest, {
9271
9524
  fallbackDeviceIdMaxAgeMs: this.config.fallbackDeviceIdMaxAgeMs,
9272
9525
  sessionIdMaxAgeMs: this.config.sessionIdMaxAgeMs
9273
9526
  });
9274
9527
  var content = resolveContentMetadata(this.config);
9275
- var macroContext = _object_spread_props(_object_spread({
9528
+ var isLive = this.isLiveStream();
9529
+ var device = getDeviceInfo();
9530
+ var playerSize = resolvePlayerSize(this.video);
9531
+ var videoDuration = this.video.duration;
9532
+ var contentDurationSeconds = (_content_contentDurationSeconds = content.contentDurationSeconds) !== null && _content_contentDurationSeconds !== void 0 ? _content_contentDurationSeconds : !isLive && Number.isFinite(videoDuration) && videoDuration > 0 ? Math.round(videoDuration) : void 0;
9533
+ var userId = resolveUserId(this.config.adUserId);
9534
+ var ipAddress = resolveClientIp(this.config.clientIpAddress);
9535
+ var userAgent2 = typeof navigator !== "undefined" && navigator.userAgent ? navigator.userAgent : void 0;
9536
+ var macroContext = _object_spread(_object_spread_props(_object_spread(_object_spread_props(_object_spread({
9276
9537
  correlator: this.viewCorrelator,
9277
9538
  streamCorrelator: this.streamCorrelator,
9278
9539
  pod: this.podCounter > 0 ? this.podCounter : void 0,
@@ -9294,8 +9555,46 @@ var AdConfigManager = /*#__PURE__*/ function() {
9294
9555
  contentNetwork: content.contentNetwork
9295
9556
  } : {}), {
9296
9557
  consent: this.consentSignals,
9297
- palNonce: palNonce.getCurrentNonce() || void 0
9298
- });
9558
+ palNonce: palNonce.getCurrentNonce() || void 0,
9559
+ deviceIdSource: envSignals.deviceIdSource,
9560
+ isLive: isLive
9561
+ }), playerSize.width ? {
9562
+ playerWidth: playerSize.width
9563
+ } : {}, playerSize.height ? {
9564
+ playerHeight: playerSize.height
9565
+ } : {}), {
9566
+ timestamp: String(Date.now())
9567
+ }), device.make ? {
9568
+ deviceMake: device.make
9569
+ } : {}, device.model ? {
9570
+ deviceModel: device.model
9571
+ } : {}, device.hardwareVersion ? {
9572
+ deviceHardwareVersion: device.hardwareVersion
9573
+ } : {}, userAgent2 ? {
9574
+ userAgent: userAgent2
9575
+ } : {}, ipAddress ? {
9576
+ ipAddress: ipAddress
9577
+ } : {}, userId ? {
9578
+ userId: userId
9579
+ } : {}, content.contentType ? {
9580
+ contentType: content.contentType
9581
+ } : {}, content.contentCategory ? {
9582
+ contentCategory: content.contentCategory
9583
+ } : {}, content.contentGenre ? {
9584
+ contentGenre: content.contentGenre
9585
+ } : {}, content.contentLanguage ? {
9586
+ contentLanguage: content.contentLanguage
9587
+ } : {}, contentDurationSeconds != null ? {
9588
+ contentDurationSeconds: contentDurationSeconds
9589
+ } : {}, content.contentSeason ? {
9590
+ contentSeason: content.contentSeason
9591
+ } : {}, content.contentEpisode ? {
9592
+ contentEpisode: content.contentEpisode
9593
+ } : {}, content.contentRating ? {
9594
+ contentRating: content.contentRating
9595
+ } : {}, content.contentId ? {
9596
+ contentId: content.contentId
9597
+ } : {});
9299
9598
  var nonceReady = !!macroContext.palNonce;
9300
9599
  var finalUrl;
9301
9600
  if (hasScvpMacros(baseUrl)) {
@@ -9309,9 +9608,11 @@ var AdConfigManager = /*#__PURE__*/ function() {
9309
9608
  } else {
9310
9609
  finalUrl = withDeferredPodParams(palNonce.injectNonce(ensureVideoAdType(applyVastMacros(baseUrl, macroContext))), !nonceReady);
9311
9610
  }
9312
- finalUrl = appendMissingContentParams(finalUrl, content);
9313
- if (this.config.ctvAdRequest && this.config.sendDeviceKeyValues !== false) {
9314
- finalUrl = applyDeviceKeyValues(finalUrl, getDeviceInfo());
9611
+ if (isGamAdUrl(finalUrl)) {
9612
+ finalUrl = appendMissingContentParams(finalUrl, content);
9613
+ if (this.config.ctvAdRequest && this.config.sendDeviceKeyValues !== false) {
9614
+ finalUrl = applyDeviceKeyValues(finalUrl, device);
9615
+ }
9315
9616
  }
9316
9617
  if (this.debug) {
9317
9618
  var id = envSignals.deviceId;
@@ -9324,7 +9625,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
9324
9625
  sidTail: envSignals.sessionId ? envSignals.sessionId.slice(-4) : void 0,
9325
9626
  ct_ch: content.channelName,
9326
9627
  ct_ti: content.programTitle,
9327
- ct_ne: content.contentNetwork
9628
+ ct_ne: content.contentNetwork,
9629
+ ifaType: toIabIfaType(envSignals.deviceIdType, envSignals.deviceIdSource),
9630
+ live: isLive,
9631
+ player: playerSize,
9632
+ make: device.make,
9633
+ model: device.model
9328
9634
  });
9329
9635
  }
9330
9636
  console.log("[StormcloudVideoPlayer] Prepared optimized-pod request URL (pod=".concat(this.podCounter, "; pmnd/pmxd/pmad resolved at dispatch):"), finalUrl);
@@ -13495,6 +13801,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
13495
13801
  return !!_this.adBreak && _this.adBreak.inAdBreak && !_this.shouldContinueLiveStreamDuringAds();
13496
13802
  }
13497
13803
  });
13804
+ this.adConfig.isLiveStream = function() {
13805
+ return _this.hlsEngine.isLiveStream;
13806
+ };
13498
13807
  this.adBreak = new AdBreakOrchestrator({
13499
13808
  config: this.config,
13500
13809
  video: this.video,
@@ -13856,16 +14165,20 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
13856
14165
  {
13857
14166
  key: "setContentMetadata",
13858
14167
  value: function setContentMetadata(meta) {
13859
- var _this = this;
13860
- var apply = function apply(key, value) {
13861
- if (value === void 0) return;
13862
- var clean = value === null ? void 0 : sanitizeContentValue(value);
13863
- if (clean) _this.config[key] = clean;
13864
- else delete _this.config[key];
13865
- };
13866
- apply("channelName", meta.channelName);
13867
- apply("programTitle", meta.programTitle);
13868
- apply("contentNetwork", meta.contentNetwork);
14168
+ applyContentMetadataUpdate(this.config, meta);
14169
+ }
14170
+ },
14171
+ {
14172
+ key: "setRequestSignals",
14173
+ value: function setRequestSignals(signals) {
14174
+ if (signals.userId !== void 0) {
14175
+ if (signals.userId) this.config.adUserId = signals.userId;
14176
+ else delete this.config.adUserId;
14177
+ }
14178
+ if (signals.ipAddress !== void 0) {
14179
+ if (signals.ipAddress) this.config.clientIpAddress = signals.ipAddress;
14180
+ else delete this.config.clientIpAddress;
14181
+ }
13869
14182
  }
13870
14183
  },
13871
14184
  {
@@ -14581,7 +14894,7 @@ var CRITICAL_PROPS = [
14581
14894
  var CONTROLS_HIDE_DELAY = 3e3;
14582
14895
  var DEFAULT_PLAYER_ASPECT_RATIO = 16 / 9;
14583
14896
  var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
14584
- var src = props.src, autoplay = props.autoplay, muted = props.muted, lowLatencyMode = props.lowLatencyMode, allowNativeHls = props.allowNativeHls, isLiveStream = props.isLiveStream, driftToleranceMs = props.driftToleranceMs, immediateManifestAds = props.immediateManifestAds, debugAdTiming = props.debugAdTiming, showCustomControls = props.showCustomControls, hideLoadingIndicator = props.hideLoadingIndicator, onVolumeToggle = props.onVolumeToggle, onFullscreenToggle = props.onFullscreenToggle, onControlClick = props.onControlClick, onReady = props.onReady, wrapperClassName = props.wrapperClassName, wrapperStyle = props.wrapperStyle, className = props.className, style = props.style, controls = props.controls, playsInline = props.playsInline, preload = props.preload, poster = props.poster, children = props.children, licenseKey = props.licenseKey, vastTagUrl = props.vastTagUrl, isVmap = props.isVmap, vmapUrl = props.vmapUrl, minSegmentsBeforePlay = props.minSegmentsBeforePlay, ctvAdRequest = props.ctvAdRequest, programTitle = props.programTitle, channelName = props.channelName, contentNetwork = props.contentNetwork, minRemainingMsToStartAd = props.minRemainingMsToStartAd, minRemainingMsToRequestAd = props.minRemainingMsToRequestAd, maxNoFillsPerBreak = props.maxNoFillsPerBreak, maxAdBreakExtensionMs = props.maxAdBreakExtensionMs, adDeviceId = props.adDeviceId, adDeviceIdType = props.adDeviceIdType, adLimitAdTracking = props.adLimitAdTracking, fallbackDeviceIdMaxAgeMs = props.fallbackDeviceIdMaxAgeMs, sessionIdMaxAgeMs = props.sessionIdMaxAgeMs, palIconsSupported = props.palIconsSupported, palSupportedApiFrameworks = props.palSupportedApiFrameworks, palContinuousPlayback = props.palContinuousPlayback, palNonceMaxAgeMs = props.palNonceMaxAgeMs, forceSingleDecoderMode = props.forceSingleDecoderMode, deviceInfo = props.deviceInfo, sendDeviceKeyValues = props.sendDeviceKeyValues, sendDeviceInfoToAnalytics = props.sendDeviceInfoToAnalytics, restVideoAttrs = _object_without_properties(props, [
14897
+ var src = props.src, autoplay = props.autoplay, muted = props.muted, lowLatencyMode = props.lowLatencyMode, allowNativeHls = props.allowNativeHls, isLiveStream = props.isLiveStream, driftToleranceMs = props.driftToleranceMs, immediateManifestAds = props.immediateManifestAds, debugAdTiming = props.debugAdTiming, showCustomControls = props.showCustomControls, hideLoadingIndicator = props.hideLoadingIndicator, onVolumeToggle = props.onVolumeToggle, onFullscreenToggle = props.onFullscreenToggle, onControlClick = props.onControlClick, onReady = props.onReady, wrapperClassName = props.wrapperClassName, wrapperStyle = props.wrapperStyle, className = props.className, style = props.style, controls = props.controls, playsInline = props.playsInline, preload = props.preload, poster = props.poster, children = props.children, licenseKey = props.licenseKey, vastTagUrl = props.vastTagUrl, isVmap = props.isVmap, vmapUrl = props.vmapUrl, minSegmentsBeforePlay = props.minSegmentsBeforePlay, ctvAdRequest = props.ctvAdRequest, programTitle = props.programTitle, channelName = props.channelName, contentNetwork = props.contentNetwork, contentDetails = props.contentDetails, adUserId = props.adUserId, clientIpAddress = props.clientIpAddress, minRemainingMsToStartAd = props.minRemainingMsToStartAd, minRemainingMsToRequestAd = props.minRemainingMsToRequestAd, maxNoFillsPerBreak = props.maxNoFillsPerBreak, maxAdBreakExtensionMs = props.maxAdBreakExtensionMs, adDeviceId = props.adDeviceId, adDeviceIdType = props.adDeviceIdType, adLimitAdTracking = props.adLimitAdTracking, fallbackDeviceIdMaxAgeMs = props.fallbackDeviceIdMaxAgeMs, sessionIdMaxAgeMs = props.sessionIdMaxAgeMs, palIconsSupported = props.palIconsSupported, palSupportedApiFrameworks = props.palSupportedApiFrameworks, palContinuousPlayback = props.palContinuousPlayback, palNonceMaxAgeMs = props.palNonceMaxAgeMs, forceSingleDecoderMode = props.forceSingleDecoderMode, deviceInfo = props.deviceInfo, sendDeviceKeyValues = props.sendDeviceKeyValues, sendDeviceInfoToAnalytics = props.sendDeviceInfoToAnalytics, restVideoAttrs = _object_without_properties(props, [
14585
14898
  "src",
14586
14899
  "autoplay",
14587
14900
  "muted",
@@ -14615,6 +14928,9 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
14615
14928
  "programTitle",
14616
14929
  "channelName",
14617
14930
  "contentNetwork",
14931
+ "contentDetails",
14932
+ "adUserId",
14933
+ "clientIpAddress",
14618
14934
  "minRemainingMsToStartAd",
14619
14935
  "minRemainingMsToRequestAd",
14620
14936
  "maxNoFillsPerBreak",
@@ -14823,6 +15139,9 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
14823
15139
  if (programTitle !== void 0) cfg.programTitle = programTitle;
14824
15140
  if (channelName !== void 0) cfg.channelName = channelName;
14825
15141
  if (contentNetwork !== void 0) cfg.contentNetwork = contentNetwork;
15142
+ if (contentDetails !== void 0) cfg.contentDetails = contentDetails;
15143
+ if (adUserId !== void 0) cfg.adUserId = adUserId;
15144
+ if (clientIpAddress !== void 0) cfg.clientIpAddress = clientIpAddress;
14826
15145
  if (minRemainingMsToStartAd !== void 0) cfg.minRemainingMsToStartAd = minRemainingMsToStartAd;
14827
15146
  if (minRemainingMsToRequestAd !== void 0) cfg.minRemainingMsToRequestAd = minRemainingMsToRequestAd;
14828
15147
  if (maxNoFillsPerBreak !== void 0) cfg.maxNoFillsPerBreak = maxNoFillsPerBreak;
@@ -14891,6 +15210,25 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
14891
15210
  programTitle,
14892
15211
  contentNetwork
14893
15212
  ]);
15213
+ var contentDetailsKey = contentDetails ? JSON.stringify(contentDetails) : "";
15214
+ (0, import_react.useEffect)(function() {
15215
+ var _playerRef_current;
15216
+ (_playerRef_current = playerRef.current) === null || _playerRef_current === void 0 ? void 0 : _playerRef_current.setContentMetadata({
15217
+ details: contentDetailsKey ? JSON.parse(contentDetailsKey) : null
15218
+ });
15219
+ }, [
15220
+ contentDetailsKey
15221
+ ]);
15222
+ (0, import_react.useEffect)(function() {
15223
+ var _playerRef_current;
15224
+ (_playerRef_current = playerRef.current) === null || _playerRef_current === void 0 ? void 0 : _playerRef_current.setRequestSignals({
15225
+ userId: adUserId !== null && adUserId !== void 0 ? adUserId : null,
15226
+ ipAddress: clientIpAddress !== null && clientIpAddress !== void 0 ? clientIpAddress : null
15227
+ });
15228
+ }, [
15229
+ adUserId,
15230
+ clientIpAddress
15231
+ ]);
14894
15232
  var lastAdDeviceIdRef = (0, import_react.useRef)(void 0);
14895
15233
  (0, import_react.useEffect)(function() {
14896
15234
  var player = playerRef.current;