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
package/lib/index.js CHANGED
@@ -1227,6 +1227,308 @@ function normalizeBoolean(value) {
1227
1227
  }
1228
1228
  return void 0;
1229
1229
  }
1230
+ // src/utils/contentMetadata.ts
1231
+ var MAX_CONTENT_VALUE_LENGTH = 128;
1232
+ var BRIDGE_KEYS = {
1233
+ channelName: [
1234
+ "channelName",
1235
+ "ct_ch"
1236
+ ],
1237
+ programTitle: [
1238
+ "programTitle",
1239
+ "ct_ti"
1240
+ ],
1241
+ contentNetwork: [
1242
+ "contentNetwork",
1243
+ "ct_ne"
1244
+ ],
1245
+ contentType: [
1246
+ "contentType",
1247
+ "ctt"
1248
+ ],
1249
+ contentCategory: [
1250
+ "contentCategory",
1251
+ "ctc"
1252
+ ],
1253
+ contentGenre: [
1254
+ "contentGenre",
1255
+ "ctgr"
1256
+ ],
1257
+ contentLanguage: [
1258
+ "contentLanguage",
1259
+ "ctlg"
1260
+ ],
1261
+ contentDuration: [
1262
+ "contentDuration",
1263
+ "ctd"
1264
+ ],
1265
+ contentSeason: [
1266
+ "contentSeason",
1267
+ "cts"
1268
+ ],
1269
+ contentEpisode: [
1270
+ "contentEpisode",
1271
+ "cte"
1272
+ ],
1273
+ contentRating: [
1274
+ "contentRating",
1275
+ "ctr"
1276
+ ],
1277
+ contentId: [
1278
+ "contentId",
1279
+ "ctid"
1280
+ ]
1281
+ };
1282
+ function sanitizeContentValue(value) {
1283
+ if (typeof value !== "string") return void 0;
1284
+ var cleaned = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
1285
+ if (!cleaned) return void 0;
1286
+ if (/^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%|\$\{[^}]+\})$/.test(cleaned)) return void 0;
1287
+ if (/^(unknown|null|undefined|none|n\/a|-)$/i.test(cleaned)) return void 0;
1288
+ return cleaned.length > MAX_CONTENT_VALUE_LENGTH ? cleaned.slice(0, MAX_CONTENT_VALUE_LENGTH).trim() : cleaned;
1289
+ }
1290
+ function sanitizeContentScalar(value) {
1291
+ if (typeof value === "number") {
1292
+ return Number.isFinite(value) ? String(value) : void 0;
1293
+ }
1294
+ return sanitizeContentValue(value);
1295
+ }
1296
+ function normalizeContentLanguage(value) {
1297
+ var cleaned = sanitizeContentValue(value);
1298
+ if (!cleaned) return void 0;
1299
+ var match = cleaned.match(/^([A-Za-z]{2})(?:[-_][A-Za-z0-9]{1,8})*$/);
1300
+ return match && match[1] ? match[1].toLowerCase() : void 0;
1301
+ }
1302
+ function normalizeContentDuration(value) {
1303
+ var raw = sanitizeContentScalar(value);
1304
+ if (raw == null || !/^-?\d+(\.\d+)?$/.test(raw)) return void 0;
1305
+ var seconds = Number(raw);
1306
+ if (seconds === -1) return -1;
1307
+ return seconds > 0 ? Math.round(seconds) : void 0;
1308
+ }
1309
+ function bridgeSources() {
1310
+ if (typeof window === "undefined") return [];
1311
+ var w = window;
1312
+ return [
1313
+ w.__STORMCLOUD_CTV__,
1314
+ w.__STORMCLOUD_CTV_AD_INFO__,
1315
+ w.stormcloudCtv
1316
+ ].filter(Boolean);
1317
+ }
1318
+ function readBridgeValue2(keys, sanitize) {
1319
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1320
+ try {
1321
+ for(var _iterator = bridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1322
+ var source = _step.value;
1323
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
1324
+ try {
1325
+ for(var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
1326
+ var key = _step1.value;
1327
+ var value = void 0;
1328
+ try {
1329
+ value = source === null || source === void 0 ? void 0 : source[key];
1330
+ if (typeof value === "function") value = value.call(source);
1331
+ } catch (unused) {
1332
+ value = void 0;
1333
+ }
1334
+ var sanitized = sanitize(value);
1335
+ if (sanitized != null) return sanitized;
1336
+ }
1337
+ } catch (err) {
1338
+ _didIteratorError1 = true;
1339
+ _iteratorError1 = err;
1340
+ } finally{
1341
+ try {
1342
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
1343
+ _iterator1.return();
1344
+ }
1345
+ } finally{
1346
+ if (_didIteratorError1) {
1347
+ throw _iteratorError1;
1348
+ }
1349
+ }
1350
+ }
1351
+ }
1352
+ } catch (err) {
1353
+ _didIteratorError = true;
1354
+ _iteratorError = err;
1355
+ } finally{
1356
+ try {
1357
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1358
+ _iterator.return();
1359
+ }
1360
+ } finally{
1361
+ if (_didIteratorError) {
1362
+ throw _iteratorError;
1363
+ }
1364
+ }
1365
+ }
1366
+ return void 0;
1367
+ }
1368
+ function readBridgeContentValue(keys) {
1369
+ return readBridgeValue2(keys, sanitizeContentValue);
1370
+ }
1371
+ function resolveContentMetadata(config) {
1372
+ var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2, _config_contentDetails, _sanitizeContentValue3, _sanitizeContentValue4, _sanitizeContentValue5, _normalizeContentLanguage, _normalizeContentDuration, _sanitizeContentScalar, _sanitizeContentScalar1, _sanitizeContentValue6, _sanitizeContentValue7;
1373
+ var channelName = (_sanitizeContentValue = sanitizeContentValue(config.channelName)) !== null && _sanitizeContentValue !== void 0 ? _sanitizeContentValue : readBridgeContentValue(BRIDGE_KEYS.channelName);
1374
+ var programTitle = (_sanitizeContentValue1 = sanitizeContentValue(config.programTitle)) !== null && _sanitizeContentValue1 !== void 0 ? _sanitizeContentValue1 : readBridgeContentValue(BRIDGE_KEYS.programTitle);
1375
+ var contentNetwork = (_sanitizeContentValue2 = sanitizeContentValue(config.contentNetwork)) !== null && _sanitizeContentValue2 !== void 0 ? _sanitizeContentValue2 : readBridgeContentValue(BRIDGE_KEYS.contentNetwork);
1376
+ var details = (_config_contentDetails = config.contentDetails) !== null && _config_contentDetails !== void 0 ? _config_contentDetails : {};
1377
+ var contentType = (_sanitizeContentValue3 = sanitizeContentValue(details.contentType)) !== null && _sanitizeContentValue3 !== void 0 ? _sanitizeContentValue3 : readBridgeContentValue(BRIDGE_KEYS.contentType);
1378
+ var contentCategory = (_sanitizeContentValue4 = sanitizeContentValue(details.category)) !== null && _sanitizeContentValue4 !== void 0 ? _sanitizeContentValue4 : readBridgeContentValue(BRIDGE_KEYS.contentCategory);
1379
+ var contentGenre = (_sanitizeContentValue5 = sanitizeContentValue(details.genre)) !== null && _sanitizeContentValue5 !== void 0 ? _sanitizeContentValue5 : readBridgeContentValue(BRIDGE_KEYS.contentGenre);
1380
+ var contentLanguage = (_normalizeContentLanguage = normalizeContentLanguage(details.language)) !== null && _normalizeContentLanguage !== void 0 ? _normalizeContentLanguage : readBridgeValue2(BRIDGE_KEYS.contentLanguage, normalizeContentLanguage);
1381
+ var contentDurationSeconds = (_normalizeContentDuration = normalizeContentDuration(details.durationSeconds)) !== null && _normalizeContentDuration !== void 0 ? _normalizeContentDuration : readBridgeValue2(BRIDGE_KEYS.contentDuration, normalizeContentDuration);
1382
+ var contentSeason = (_sanitizeContentScalar = sanitizeContentScalar(details.season)) !== null && _sanitizeContentScalar !== void 0 ? _sanitizeContentScalar : readBridgeValue2(BRIDGE_KEYS.contentSeason, sanitizeContentScalar);
1383
+ var contentEpisode = (_sanitizeContentScalar1 = sanitizeContentScalar(details.episode)) !== null && _sanitizeContentScalar1 !== void 0 ? _sanitizeContentScalar1 : readBridgeValue2(BRIDGE_KEYS.contentEpisode, sanitizeContentScalar);
1384
+ var contentRating = (_sanitizeContentValue6 = sanitizeContentValue(details.rating)) !== null && _sanitizeContentValue6 !== void 0 ? _sanitizeContentValue6 : readBridgeContentValue(BRIDGE_KEYS.contentRating);
1385
+ var contentId = (_sanitizeContentValue7 = sanitizeContentValue(details.contentId)) !== null && _sanitizeContentValue7 !== void 0 ? _sanitizeContentValue7 : readBridgeContentValue(BRIDGE_KEYS.contentId);
1386
+ return _object_spread({}, channelName ? {
1387
+ channelName: channelName
1388
+ } : {}, programTitle ? {
1389
+ programTitle: programTitle
1390
+ } : {}, contentNetwork ? {
1391
+ contentNetwork: contentNetwork
1392
+ } : {}, contentType ? {
1393
+ contentType: contentType
1394
+ } : {}, contentCategory ? {
1395
+ contentCategory: contentCategory
1396
+ } : {}, contentGenre ? {
1397
+ contentGenre: contentGenre
1398
+ } : {}, contentLanguage ? {
1399
+ contentLanguage: contentLanguage
1400
+ } : {}, contentDurationSeconds != null ? {
1401
+ contentDurationSeconds: contentDurationSeconds
1402
+ } : {}, contentSeason ? {
1403
+ contentSeason: contentSeason
1404
+ } : {}, contentEpisode ? {
1405
+ contentEpisode: contentEpisode
1406
+ } : {}, contentRating ? {
1407
+ contentRating: contentRating
1408
+ } : {}, contentId ? {
1409
+ contentId: contentId
1410
+ } : {});
1411
+ }
1412
+ function applyContentMetadataUpdate(target, meta) {
1413
+ var apply = function apply(key, value) {
1414
+ if (value === void 0) return;
1415
+ var clean = value === null ? void 0 : sanitizeContentValue(value);
1416
+ if (clean) target[key] = clean;
1417
+ else delete target[key];
1418
+ };
1419
+ apply("channelName", meta.channelName);
1420
+ apply("programTitle", meta.programTitle);
1421
+ apply("contentNetwork", meta.contentNetwork);
1422
+ if (meta.details === void 0) return;
1423
+ if (meta.details === null) delete target.contentDetails;
1424
+ else target.contentDetails = _object_spread({}, meta.details);
1425
+ }
1426
+ function appendMissingContentParams(url, meta) {
1427
+ if (!meta.channelName && !meta.programTitle && !meta.contentNetwork) return url;
1428
+ try {
1429
+ var parsed = new URL(url);
1430
+ var add = function add(key, value) {
1431
+ if (value && !parsed.searchParams.has(key)) parsed.searchParams.set(key, value);
1432
+ };
1433
+ add("ct_ch", meta.channelName);
1434
+ add("ct_ti", meta.programTitle);
1435
+ add("ct_ne", meta.contentNetwork);
1436
+ return parsed.toString();
1437
+ } catch (unused) {
1438
+ return url;
1439
+ }
1440
+ }
1441
+ // src/utils/partnerSignals.ts
1442
+ var PLATFORM_IFA_TYPES = /* @__PURE__ */ new Set([
1443
+ "aaid",
1444
+ "adid",
1445
+ "afai",
1446
+ "idfa",
1447
+ "lgudid",
1448
+ "msai",
1449
+ "rida",
1450
+ "tifa",
1451
+ "tvos",
1452
+ "vaid",
1453
+ "vida"
1454
+ ]);
1455
+ function toIabIfaType(deviceIdType, source) {
1456
+ if (!deviceIdType) return void 0;
1457
+ var type = deviceIdType.trim().toLowerCase();
1458
+ if (source === "generated") return "sessionid";
1459
+ if (PLATFORM_IFA_TYPES.has(type)) return type;
1460
+ if (source === "platform") return "dpid";
1461
+ return "ppid";
1462
+ }
1463
+ function playbackMethodCode(autoPlay, muted) {
1464
+ if (autoPlay === false) return 3;
1465
+ if (autoPlay !== true || muted == null) return void 0;
1466
+ return muted ? 2 : 1;
1467
+ }
1468
+ function resolvePlayerSize(video) {
1469
+ var width = video ? video.clientWidth : 0;
1470
+ var height = video ? video.clientHeight : 0;
1471
+ if (!(width > 0 && height > 0) && typeof window !== "undefined") {
1472
+ width = window.innerWidth;
1473
+ height = window.innerHeight;
1474
+ }
1475
+ if (!(width > 0 && height > 0)) return {};
1476
+ return {
1477
+ width: Math.round(width),
1478
+ height: Math.round(height)
1479
+ };
1480
+ }
1481
+ function sanitizeUserId(value) {
1482
+ var cleaned = sanitizeContentValue(value);
1483
+ if (!cleaned || /\s/.test(cleaned)) return void 0;
1484
+ return cleaned;
1485
+ }
1486
+ function isPublicIpv4(ip) {
1487
+ var parts = ip.split(".");
1488
+ if (parts.length !== 4) return false;
1489
+ var nums = parts.map(function(p) {
1490
+ return /^\d{1,3}$/.test(p) ? Number(p) : NaN;
1491
+ });
1492
+ if (nums.some(function(n) {
1493
+ return !(n >= 0 && n <= 255);
1494
+ })) return false;
1495
+ var _nums = _sliced_to_array(nums, 2), a = _nums[0], b = _nums[1];
1496
+ if (a === 0 || a === 10 || a === 127 || a >= 224) return false;
1497
+ if (a === 100 && b >= 64 && b <= 127) return false;
1498
+ if (a === 169 && b === 254) return false;
1499
+ if (a === 172 && b >= 16 && b <= 31) return false;
1500
+ if (a === 192 && b === 168) return false;
1501
+ return true;
1502
+ }
1503
+ function isPublicIpv6(ip) {
1504
+ var lower = ip.toLowerCase();
1505
+ if (!/^[0-9a-f:]+$/.test(lower) || lower.split(":").length < 3) return false;
1506
+ if (lower === "::" || lower === "::1") return false;
1507
+ if (/^fe[89ab]/.test(lower)) return false;
1508
+ if (/^f[cd]/.test(lower)) return false;
1509
+ return true;
1510
+ }
1511
+ function sanitizePublicIp(value) {
1512
+ var cleaned = sanitizeContentValue(value);
1513
+ if (!cleaned) return void 0;
1514
+ if (cleaned.includes(".")) return isPublicIpv4(cleaned) ? cleaned : void 0;
1515
+ return isPublicIpv6(cleaned) ? cleaned : void 0;
1516
+ }
1517
+ function resolveUserId(configValue) {
1518
+ var _sanitizeUserId;
1519
+ return (_sanitizeUserId = sanitizeUserId(configValue)) !== null && _sanitizeUserId !== void 0 ? _sanitizeUserId : readBridgeValue2([
1520
+ "userId",
1521
+ "uid"
1522
+ ], sanitizeUserId);
1523
+ }
1524
+ function resolveClientIp(configValue) {
1525
+ var _sanitizePublicIp;
1526
+ return (_sanitizePublicIp = sanitizePublicIp(configValue)) !== null && _sanitizePublicIp !== void 0 ? _sanitizePublicIp : readBridgeValue2([
1527
+ "ipAddress",
1528
+ "clientIp",
1529
+ "ip"
1530
+ ], sanitizePublicIp);
1531
+ }
1230
1532
  // src/utils/vastMacros.ts
1231
1533
  var UNEXPANDED_MACRO_PATTERN = /^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%)$/;
1232
1534
  var INVALID_VAST_PARAM_KEY = /^\s|\s$/;
@@ -1544,7 +1846,8 @@ var NESTED_QUERY_PARAM_KEYS = /* @__PURE__ */ new Set([
1544
1846
  var SCVP_POD_MACROS = /* @__PURE__ */ new Set([
1545
1847
  "PMND",
1546
1848
  "PMXD",
1547
- "PMAD"
1849
+ "PMAD",
1850
+ "MABD"
1548
1851
  ]);
1549
1852
  function hasScvpMacros(url) {
1550
1853
  return !!url && SCVP_MACRO_DETECT.test(url);
@@ -1589,6 +1892,8 @@ function resolveScvpMacroValues(ctx) {
1589
1892
  set("RDID", deviceId);
1590
1893
  set("IDTYPE", deviceIdType);
1591
1894
  set("IS-LAT", (_toFlag = toFlag(ctx.limitAdTracking)) !== null && _toFlag !== void 0 ? _toFlag : "0");
1895
+ set("IFA", deviceId);
1896
+ set("IFA-TYPE", toIabIfaType(deviceIdType, ctx.deviceIdSource));
1592
1897
  }
1593
1898
  set("SID", ctx.sessionId);
1594
1899
  set("DTH", ctx.deviceTypeHint);
@@ -1606,6 +1911,26 @@ function resolveScvpMacroValues(ctx) {
1606
1911
  set("GDPR", (_ctx_consent = ctx.consent) === null || _ctx_consent === void 0 ? void 0 : _ctx_consent.gdpr);
1607
1912
  set("GDPR-CONSENT", (_ctx_consent1 = ctx.consent) === null || _ctx_consent1 === void 0 ? void 0 : _ctx_consent1.gdprConsent);
1608
1913
  set("US-PRIVACY", (_ctx_consent2 = ctx.consent) === null || _ctx_consent2 === void 0 ? void 0 : _ctx_consent2.usPrivacy);
1914
+ set("PLAYER-WIDTH", ctx.playerWidth);
1915
+ set("PLAYER-HEIGHT", ctx.playerHeight);
1916
+ set("TIMESTAMP", ctx.timestamp);
1917
+ set("LIVE", toFlag(ctx.isLive));
1918
+ set("VPMT", playbackMethodCode(ctx.isCtv ? true : ctx.adWillAutoPlay, ctx.adWillPlayMuted));
1919
+ set("DEVICE-MAKE", ctx.deviceMake);
1920
+ set("DEVICE-MODEL", ctx.deviceModel);
1921
+ set("DEVICE-HWV", ctx.deviceHardwareVersion);
1922
+ set("UA", ctx.userAgent);
1923
+ set("IP", ctx.ipAddress);
1924
+ set("UID", ctx.userId);
1925
+ set("CT-TYPE", ctx.contentType);
1926
+ set("CT-CATEGORY", ctx.contentCategory);
1927
+ set("CT-GENRE", ctx.contentGenre);
1928
+ set("CT-LANGUAGE", ctx.contentLanguage);
1929
+ set("CT-DURATION", ctx.contentDurationSeconds != null ? ctx.contentDurationSeconds : ctx.isLive ? -1 : void 0);
1930
+ set("CT-SEASON", ctx.contentSeason);
1931
+ set("CT-EPISODE", ctx.contentEpisode);
1932
+ set("CT-RATING", ctx.contentRating);
1933
+ set("CT-ID", ctx.contentId);
1609
1934
  return values;
1610
1935
  }
1611
1936
  var keepNone = function keepNone() {
@@ -2854,15 +3179,20 @@ function finalizeGamRequestUrl(rawUrl, ctx) {
2854
3179
  values.set("PMND", String(pod.pmnd));
2855
3180
  values.set("PMXD", String(pod.pmxd));
2856
3181
  if (pod.pmad != null) values.set("PMAD", String(pod.pmad));
3182
+ values.set("MABD", String(Math.max(1, Math.floor(pod.pmxd / 1e3))));
2857
3183
  }
2858
3184
  var substituted = substituteScvpMacros(rawUrl, values);
2859
3185
  var finalUrl;
2860
3186
  try {
2861
3187
  var url = new URL(normalizeVastTagUrl(substituted.url));
3188
+ var isGam = GAM_AD_HOSTS.has(url.hostname);
3189
+ var setPodParam = function setPodParam(key, value) {
3190
+ if (isGam || url.searchParams.has(key)) url.searchParams.set(key, String(value));
3191
+ };
2862
3192
  if (pod) {
2863
- url.searchParams.set("pmnd", String(pod.pmnd));
2864
- url.searchParams.set("pmxd", String(pod.pmxd));
2865
- if (pod.pmad != null) url.searchParams.set("pmad", String(pod.pmad));
3193
+ setPodParam("pmnd", pod.pmnd);
3194
+ setPodParam("pmxd", pod.pmxd);
3195
+ if (pod.pmad != null) setPodParam("pmad", pod.pmad);
2866
3196
  else url.searchParams.delete("pmad");
2867
3197
  } else {
2868
3198
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -2928,7 +3258,9 @@ function validateGamRequestUrl(url, expect) {
2928
3258
  if (leftover.length > 0) problems.push("unresolved SCVP macros: ".concat(leftover.join(", ")));
2929
3259
  var params;
2930
3260
  try {
2931
- params = new URL(url).searchParams;
3261
+ var parsed = new URL(url);
3262
+ if (!GAM_AD_HOSTS.has(parsed.hostname)) return problems;
3263
+ params = parsed.searchParams;
2932
3264
  } catch (unused) {
2933
3265
  return problems.concat("URL could not be parsed");
2934
3266
  }
@@ -6349,7 +6681,7 @@ function safeCall2(fn, thisArg) {
6349
6681
  function userAgent() {
6350
6682
  return typeof navigator !== "undefined" ? navigator.userAgent || "" : "";
6351
6683
  }
6352
- function bridgeSources() {
6684
+ function bridgeSources2() {
6353
6685
  if (typeof window === "undefined") return [];
6354
6686
  var w = window;
6355
6687
  return [
@@ -6361,7 +6693,7 @@ function bridgeSources() {
6361
6693
  function readBridge(keys) {
6362
6694
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
6363
6695
  try {
6364
- for(var _iterator = bridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6696
+ for(var _iterator = bridgeSources2()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6365
6697
  var source = _step.value;
6366
6698
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
6367
6699
  try {
@@ -6408,6 +6740,11 @@ function readBridge(keys) {
6408
6740
  }
6409
6741
  return void 0;
6410
6742
  }
6743
+ function makeForCategory(category) {
6744
+ if (category === "LG TV" || category === "LG Set-Top Box") return "LG";
6745
+ if (category === "Samsung TV") return "Samsung";
6746
+ return void 0;
6747
+ }
6411
6748
  function normalizeCategory(value) {
6412
6749
  var v = cleanString(value);
6413
6750
  if (!v) return void 0;
@@ -6555,7 +6892,7 @@ function primeDeviceInfo() {
6555
6892
  return primePromise;
6556
6893
  }
6557
6894
  function getDeviceInfo() {
6558
- var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory;
6895
+ var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory, _ref3, _cleanString4, _cleanString5;
6559
6896
  var platform = platformCache !== null && platformCache !== void 0 ? platformCache : computePlatformInfo();
6560
6897
  if (primePromise && !platformCache) {} else {
6561
6898
  platformCache = platform;
@@ -6578,7 +6915,14 @@ function getDeviceInfo() {
6578
6915
  ]),
6579
6916
  category: normalizeCategory(readBridge([
6580
6917
  "deviceCategory"
6581
- ]))
6918
+ ])),
6919
+ make: readBridge([
6920
+ "deviceMake"
6921
+ ]),
6922
+ hardwareVersion: readBridge([
6923
+ "deviceHardwareVersion",
6924
+ "hardwareVersion"
6925
+ ])
6582
6926
  };
6583
6927
  var terminalId = (_cleanString = cleanString(host.terminalId)) !== null && _cleanString !== void 0 ? _cleanString : bridge.terminalId;
6584
6928
  var hostInternalId = (_cleanString1 = cleanString(host.internalDeviceId)) !== null && _cleanString1 !== void 0 ? _cleanString1 : bridge.internalDeviceId;
@@ -6591,7 +6935,9 @@ function getDeviceInfo() {
6591
6935
  bridge.internalDeviceId,
6592
6936
  bridge.model,
6593
6937
  bridge.firmware,
6594
- bridge.category
6938
+ bridge.category,
6939
+ bridge.make,
6940
+ bridge.hardwareVersion
6595
6941
  ];
6596
6942
  if (bridgeValues.some(function(v) {
6597
6943
  return v !== void 0;
@@ -6599,12 +6945,18 @@ function getDeviceInfo() {
6599
6945
  if (hostDeviceInfo) sources.unshift("host");
6600
6946
  var internalDeviceId = hostInternalId !== null && hostInternalId !== void 0 ? hostInternalId : platform.internalDeviceId;
6601
6947
  var internalDeviceIdSource = hostInternalId ? "host" : platform.internalDeviceIdSource;
6948
+ var make = (_ref3 = (_cleanString4 = cleanString(host.make, 40)) !== null && _cleanString4 !== void 0 ? _cleanString4 : bridge.make) !== null && _ref3 !== void 0 ? _ref3 : makeForCategory(category);
6949
+ var hardwareVersion = (_cleanString5 = cleanString(host.hardwareVersion, 40)) !== null && _cleanString5 !== void 0 ? _cleanString5 : bridge.hardwareVersion;
6602
6950
  var sonifiModel = model && category === "Samsung TV" && !/^SAMSUNG-IPTV-/i.test(model) ? "SAMSUNG-IPTV-".concat(model) : model;
6603
6951
  return _object_spread_props(_object_spread({
6604
6952
  category: category,
6605
6953
  categoryCode: CATEGORY_CODES[category]
6606
- }, model ? {
6954
+ }, make ? {
6955
+ make: make
6956
+ } : {}, model ? {
6607
6957
  model: model
6958
+ } : {}, hardwareVersion ? {
6959
+ hardwareVersion: hardwareVersion
6608
6960
  } : {}, sonifiModel ? {
6609
6961
  sonifiModel: sonifiModel
6610
6962
  } : {}, firmware ? {
@@ -6695,117 +7047,6 @@ function deviceInfoAnalyticsFields(info) {
6695
7047
  terminal_id: info.terminalId
6696
7048
  } : {});
6697
7049
  }
6698
- // src/utils/contentMetadata.ts
6699
- var MAX_CONTENT_VALUE_LENGTH = 128;
6700
- var BRIDGE_KEYS = {
6701
- channelName: [
6702
- "channelName",
6703
- "ct_ch"
6704
- ],
6705
- programTitle: [
6706
- "programTitle",
6707
- "ct_ti"
6708
- ],
6709
- contentNetwork: [
6710
- "contentNetwork",
6711
- "ct_ne"
6712
- ]
6713
- };
6714
- function sanitizeContentValue(value) {
6715
- if (typeof value !== "string") return void 0;
6716
- var cleaned = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
6717
- if (!cleaned) return void 0;
6718
- if (/^(\[[^\]]*\]|\{[^}]*\}|%%[^%]*%%|\$\{[^}]+\})$/.test(cleaned)) return void 0;
6719
- if (/^(unknown|null|undefined|none|n\/a|-)$/i.test(cleaned)) return void 0;
6720
- return cleaned.length > MAX_CONTENT_VALUE_LENGTH ? cleaned.slice(0, MAX_CONTENT_VALUE_LENGTH).trim() : cleaned;
6721
- }
6722
- function bridgeSources2() {
6723
- if (typeof window === "undefined") return [];
6724
- var w = window;
6725
- return [
6726
- w.__STORMCLOUD_CTV__,
6727
- w.__STORMCLOUD_CTV_AD_INFO__,
6728
- w.stormcloudCtv
6729
- ].filter(Boolean);
6730
- }
6731
- function readBridgeContentValue(keys) {
6732
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
6733
- try {
6734
- for(var _iterator = bridgeSources2()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6735
- var source = _step.value;
6736
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
6737
- try {
6738
- for(var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
6739
- var key = _step1.value;
6740
- var value = void 0;
6741
- try {
6742
- value = source === null || source === void 0 ? void 0 : source[key];
6743
- if (typeof value === "function") value = value.call(source);
6744
- } catch (unused) {
6745
- value = void 0;
6746
- }
6747
- var sanitized = sanitizeContentValue(value);
6748
- if (sanitized) return sanitized;
6749
- }
6750
- } catch (err) {
6751
- _didIteratorError1 = true;
6752
- _iteratorError1 = err;
6753
- } finally{
6754
- try {
6755
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
6756
- _iterator1.return();
6757
- }
6758
- } finally{
6759
- if (_didIteratorError1) {
6760
- throw _iteratorError1;
6761
- }
6762
- }
6763
- }
6764
- }
6765
- } catch (err) {
6766
- _didIteratorError = true;
6767
- _iteratorError = err;
6768
- } finally{
6769
- try {
6770
- if (!_iteratorNormalCompletion && _iterator.return != null) {
6771
- _iterator.return();
6772
- }
6773
- } finally{
6774
- if (_didIteratorError) {
6775
- throw _iteratorError;
6776
- }
6777
- }
6778
- }
6779
- return void 0;
6780
- }
6781
- function resolveContentMetadata(config) {
6782
- var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2;
6783
- var channelName = (_sanitizeContentValue = sanitizeContentValue(config.channelName)) !== null && _sanitizeContentValue !== void 0 ? _sanitizeContentValue : readBridgeContentValue(BRIDGE_KEYS.channelName);
6784
- var programTitle = (_sanitizeContentValue1 = sanitizeContentValue(config.programTitle)) !== null && _sanitizeContentValue1 !== void 0 ? _sanitizeContentValue1 : readBridgeContentValue(BRIDGE_KEYS.programTitle);
6785
- var contentNetwork = (_sanitizeContentValue2 = sanitizeContentValue(config.contentNetwork)) !== null && _sanitizeContentValue2 !== void 0 ? _sanitizeContentValue2 : readBridgeContentValue(BRIDGE_KEYS.contentNetwork);
6786
- return _object_spread({}, channelName ? {
6787
- channelName: channelName
6788
- } : {}, programTitle ? {
6789
- programTitle: programTitle
6790
- } : {}, contentNetwork ? {
6791
- contentNetwork: contentNetwork
6792
- } : {});
6793
- }
6794
- function appendMissingContentParams(url, meta) {
6795
- if (!meta.channelName && !meta.programTitle && !meta.contentNetwork) return url;
6796
- try {
6797
- var parsed = new URL(url);
6798
- var add = function add(key, value) {
6799
- if (value && !parsed.searchParams.has(key)) parsed.searchParams.set(key, value);
6800
- };
6801
- add("ct_ch", meta.channelName);
6802
- add("ct_ti", meta.programTitle);
6803
- add("ct_ne", meta.contentNetwork);
6804
- return parsed.toString();
6805
- } catch (unused) {
6806
- return url;
6807
- }
6808
- }
6809
7050
  // src/utils/screenActivity.ts
6810
7051
  var hostStandby = false;
6811
7052
  function setHostStandby(standby) {
@@ -8817,6 +9058,13 @@ var Scte35CueManager = /*#__PURE__*/ function() {
8817
9058
  return Scte35CueManager;
8818
9059
  }();
8819
9060
  // src/player/AdConfigManager.ts
9061
+ function isGamAdUrl(rawUrl) {
9062
+ try {
9063
+ return GAM_AD_HOSTS.has(new URL(rawUrl).hostname);
9064
+ } catch (unused) {
9065
+ return false;
9066
+ }
9067
+ }
8820
9068
  function withDeferredPodParams(rawUrl, deferNonce) {
8821
9069
  try {
8822
9070
  var url = new URL(rawUrl);
@@ -8835,11 +9083,15 @@ function withDeferredPodParams(rawUrl, deferNonce) {
8835
9083
  var AdConfigManager = /*#__PURE__*/ function() {
8836
9084
  "use strict";
8837
9085
  function AdConfigManager(config, video) {
9086
+ var _this = this;
8838
9087
  _class_call_check(this, AdConfigManager);
8839
9088
  this.vmapBreaks = [];
8840
9089
  this.consumedVmapBreakIds = /* @__PURE__ */ new Set();
8841
9090
  this.streamCorrelator = generateCorrelator();
8842
9091
  this.consentSignals = {};
9092
+ this.isLiveStream = function() {
9093
+ return !!_this.config.isLiveStream;
9094
+ };
8843
9095
  this.podCounter = 0;
8844
9096
  this.podAssignedByPrefetch = false;
8845
9097
  this.lastHeartbeatTime = 0;
@@ -9290,13 +9542,22 @@ var AdConfigManager = /*#__PURE__*/ function() {
9290
9542
  {
9291
9543
  key: "generatePodVastUrl",
9292
9544
  value: function generatePodVastUrl(baseUrl, adPlayer, palNonce, inAdBreak) {
9545
+ var _content_contentDurationSeconds;
9293
9546
  var adWillPlayMuted = inAdBreak ? adPlayer.getOriginalMutedState() : this.video.muted;
9294
9547
  var envSignals = resolveVastEnvironmentSignals(!!this.config.ctvAdRequest, {
9295
9548
  fallbackDeviceIdMaxAgeMs: this.config.fallbackDeviceIdMaxAgeMs,
9296
9549
  sessionIdMaxAgeMs: this.config.sessionIdMaxAgeMs
9297
9550
  });
9298
9551
  var content = resolveContentMetadata(this.config);
9299
- var macroContext = _object_spread_props(_object_spread({
9552
+ var isLive = this.isLiveStream();
9553
+ var device = getDeviceInfo();
9554
+ var playerSize = resolvePlayerSize(this.video);
9555
+ var videoDuration = this.video.duration;
9556
+ var contentDurationSeconds = (_content_contentDurationSeconds = content.contentDurationSeconds) !== null && _content_contentDurationSeconds !== void 0 ? _content_contentDurationSeconds : !isLive && Number.isFinite(videoDuration) && videoDuration > 0 ? Math.round(videoDuration) : void 0;
9557
+ var userId = resolveUserId(this.config.adUserId);
9558
+ var ipAddress = resolveClientIp(this.config.clientIpAddress);
9559
+ var userAgent2 = typeof navigator !== "undefined" && navigator.userAgent ? navigator.userAgent : void 0;
9560
+ var macroContext = _object_spread(_object_spread_props(_object_spread(_object_spread_props(_object_spread({
9300
9561
  correlator: this.viewCorrelator,
9301
9562
  streamCorrelator: this.streamCorrelator,
9302
9563
  pod: this.podCounter > 0 ? this.podCounter : void 0,
@@ -9318,8 +9579,46 @@ var AdConfigManager = /*#__PURE__*/ function() {
9318
9579
  contentNetwork: content.contentNetwork
9319
9580
  } : {}), {
9320
9581
  consent: this.consentSignals,
9321
- palNonce: palNonce.getCurrentNonce() || void 0
9322
- });
9582
+ palNonce: palNonce.getCurrentNonce() || void 0,
9583
+ deviceIdSource: envSignals.deviceIdSource,
9584
+ isLive: isLive
9585
+ }), playerSize.width ? {
9586
+ playerWidth: playerSize.width
9587
+ } : {}, playerSize.height ? {
9588
+ playerHeight: playerSize.height
9589
+ } : {}), {
9590
+ timestamp: String(Date.now())
9591
+ }), device.make ? {
9592
+ deviceMake: device.make
9593
+ } : {}, device.model ? {
9594
+ deviceModel: device.model
9595
+ } : {}, device.hardwareVersion ? {
9596
+ deviceHardwareVersion: device.hardwareVersion
9597
+ } : {}, userAgent2 ? {
9598
+ userAgent: userAgent2
9599
+ } : {}, ipAddress ? {
9600
+ ipAddress: ipAddress
9601
+ } : {}, userId ? {
9602
+ userId: userId
9603
+ } : {}, content.contentType ? {
9604
+ contentType: content.contentType
9605
+ } : {}, content.contentCategory ? {
9606
+ contentCategory: content.contentCategory
9607
+ } : {}, content.contentGenre ? {
9608
+ contentGenre: content.contentGenre
9609
+ } : {}, content.contentLanguage ? {
9610
+ contentLanguage: content.contentLanguage
9611
+ } : {}, contentDurationSeconds != null ? {
9612
+ contentDurationSeconds: contentDurationSeconds
9613
+ } : {}, content.contentSeason ? {
9614
+ contentSeason: content.contentSeason
9615
+ } : {}, content.contentEpisode ? {
9616
+ contentEpisode: content.contentEpisode
9617
+ } : {}, content.contentRating ? {
9618
+ contentRating: content.contentRating
9619
+ } : {}, content.contentId ? {
9620
+ contentId: content.contentId
9621
+ } : {});
9323
9622
  var nonceReady = !!macroContext.palNonce;
9324
9623
  var finalUrl;
9325
9624
  if (hasScvpMacros(baseUrl)) {
@@ -9333,9 +9632,11 @@ var AdConfigManager = /*#__PURE__*/ function() {
9333
9632
  } else {
9334
9633
  finalUrl = withDeferredPodParams(palNonce.injectNonce(ensureVideoAdType(applyVastMacros(baseUrl, macroContext))), !nonceReady);
9335
9634
  }
9336
- finalUrl = appendMissingContentParams(finalUrl, content);
9337
- if (this.config.ctvAdRequest && this.config.sendDeviceKeyValues !== false) {
9338
- finalUrl = applyDeviceKeyValues(finalUrl, getDeviceInfo());
9635
+ if (isGamAdUrl(finalUrl)) {
9636
+ finalUrl = appendMissingContentParams(finalUrl, content);
9637
+ if (this.config.ctvAdRequest && this.config.sendDeviceKeyValues !== false) {
9638
+ finalUrl = applyDeviceKeyValues(finalUrl, device);
9639
+ }
9339
9640
  }
9340
9641
  if (this.debug) {
9341
9642
  var id = envSignals.deviceId;
@@ -9348,7 +9649,12 @@ var AdConfigManager = /*#__PURE__*/ function() {
9348
9649
  sidTail: envSignals.sessionId ? envSignals.sessionId.slice(-4) : void 0,
9349
9650
  ct_ch: content.channelName,
9350
9651
  ct_ti: content.programTitle,
9351
- ct_ne: content.contentNetwork
9652
+ ct_ne: content.contentNetwork,
9653
+ ifaType: toIabIfaType(envSignals.deviceIdType, envSignals.deviceIdSource),
9654
+ live: isLive,
9655
+ player: playerSize,
9656
+ make: device.make,
9657
+ model: device.model
9352
9658
  });
9353
9659
  }
9354
9660
  console.log("[StormcloudVideoPlayer] Prepared optimized-pod request URL (pod=".concat(this.podCounter, "; pmnd/pmxd/pmad resolved at dispatch):"), finalUrl);
@@ -13525,6 +13831,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
13525
13831
  return !!_this.adBreak && _this.adBreak.inAdBreak && !_this.shouldContinueLiveStreamDuringAds();
13526
13832
  }
13527
13833
  });
13834
+ this.adConfig.isLiveStream = function() {
13835
+ return _this.hlsEngine.isLiveStream;
13836
+ };
13528
13837
  this.adBreak = new AdBreakOrchestrator({
13529
13838
  config: this.config,
13530
13839
  video: this.video,
@@ -13886,16 +14195,20 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
13886
14195
  {
13887
14196
  key: "setContentMetadata",
13888
14197
  value: function setContentMetadata(meta) {
13889
- var _this = this;
13890
- var apply = function apply(key, value) {
13891
- if (value === void 0) return;
13892
- var clean = value === null ? void 0 : sanitizeContentValue(value);
13893
- if (clean) _this.config[key] = clean;
13894
- else delete _this.config[key];
13895
- };
13896
- apply("channelName", meta.channelName);
13897
- apply("programTitle", meta.programTitle);
13898
- apply("contentNetwork", meta.contentNetwork);
14198
+ applyContentMetadataUpdate(this.config, meta);
14199
+ }
14200
+ },
14201
+ {
14202
+ key: "setRequestSignals",
14203
+ value: function setRequestSignals(signals) {
14204
+ if (signals.userId !== void 0) {
14205
+ if (signals.userId) this.config.adUserId = signals.userId;
14206
+ else delete this.config.adUserId;
14207
+ }
14208
+ if (signals.ipAddress !== void 0) {
14209
+ if (signals.ipAddress) this.config.clientIpAddress = signals.ipAddress;
14210
+ else delete this.config.clientIpAddress;
14211
+ }
13899
14212
  }
13900
14213
  },
13901
14214
  {
@@ -14611,7 +14924,7 @@ var CRITICAL_PROPS = [
14611
14924
  var CONTROLS_HIDE_DELAY = 3e3;
14612
14925
  var DEFAULT_PLAYER_ASPECT_RATIO = 16 / 9;
14613
14926
  var StormcloudVideoPlayerComponent = React.memo(function(props) {
14614
- 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, [
14927
+ 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, [
14615
14928
  "src",
14616
14929
  "autoplay",
14617
14930
  "muted",
@@ -14645,6 +14958,9 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
14645
14958
  "programTitle",
14646
14959
  "channelName",
14647
14960
  "contentNetwork",
14961
+ "contentDetails",
14962
+ "adUserId",
14963
+ "clientIpAddress",
14648
14964
  "minRemainingMsToStartAd",
14649
14965
  "minRemainingMsToRequestAd",
14650
14966
  "maxNoFillsPerBreak",
@@ -14853,6 +15169,9 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
14853
15169
  if (programTitle !== void 0) cfg.programTitle = programTitle;
14854
15170
  if (channelName !== void 0) cfg.channelName = channelName;
14855
15171
  if (contentNetwork !== void 0) cfg.contentNetwork = contentNetwork;
15172
+ if (contentDetails !== void 0) cfg.contentDetails = contentDetails;
15173
+ if (adUserId !== void 0) cfg.adUserId = adUserId;
15174
+ if (clientIpAddress !== void 0) cfg.clientIpAddress = clientIpAddress;
14856
15175
  if (minRemainingMsToStartAd !== void 0) cfg.minRemainingMsToStartAd = minRemainingMsToStartAd;
14857
15176
  if (minRemainingMsToRequestAd !== void 0) cfg.minRemainingMsToRequestAd = minRemainingMsToRequestAd;
14858
15177
  if (maxNoFillsPerBreak !== void 0) cfg.maxNoFillsPerBreak = maxNoFillsPerBreak;
@@ -14921,6 +15240,25 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
14921
15240
  programTitle,
14922
15241
  contentNetwork
14923
15242
  ]);
15243
+ var contentDetailsKey = contentDetails ? JSON.stringify(contentDetails) : "";
15244
+ useEffect(function() {
15245
+ var _playerRef_current;
15246
+ (_playerRef_current = playerRef.current) === null || _playerRef_current === void 0 ? void 0 : _playerRef_current.setContentMetadata({
15247
+ details: contentDetailsKey ? JSON.parse(contentDetailsKey) : null
15248
+ });
15249
+ }, [
15250
+ contentDetailsKey
15251
+ ]);
15252
+ useEffect(function() {
15253
+ var _playerRef_current;
15254
+ (_playerRef_current = playerRef.current) === null || _playerRef_current === void 0 ? void 0 : _playerRef_current.setRequestSignals({
15255
+ userId: adUserId !== null && adUserId !== void 0 ? adUserId : null,
15256
+ ipAddress: clientIpAddress !== null && clientIpAddress !== void 0 ? clientIpAddress : null
15257
+ });
15258
+ }, [
15259
+ adUserId,
15260
+ clientIpAddress
15261
+ ]);
14924
15262
  var lastAdDeviceIdRef = useRef(void 0);
14925
15263
  useEffect(function() {
14926
15264
  var player = playerRef.current;