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
|
@@ -4,6 +4,7 @@ import { StormcloudVideoPlayerConfig } from '../types.cjs';
|
|
|
4
4
|
import '../player/FloorLadder.cjs';
|
|
5
5
|
import '../utils/deviceInfo.cjs';
|
|
6
6
|
import '../utils/adIdentity.cjs';
|
|
7
|
+
import '../utils/contentMetadata.cjs';
|
|
7
8
|
import '../player/OptimizedPodRequest.cjs';
|
|
8
9
|
|
|
9
10
|
type StormcloudVideoPlayerProps = Omit<StormcloudVideoPlayerConfig, "videoElement"> & React.VideoHTMLAttributes<HTMLVideoElement> & {
|
|
@@ -23258,6 +23258,42 @@ var BRIDGE_KEYS = {
|
|
|
23258
23258
|
contentNetwork: [
|
|
23259
23259
|
"contentNetwork",
|
|
23260
23260
|
"ct_ne"
|
|
23261
|
+
],
|
|
23262
|
+
contentType: [
|
|
23263
|
+
"contentType",
|
|
23264
|
+
"ctt"
|
|
23265
|
+
],
|
|
23266
|
+
contentCategory: [
|
|
23267
|
+
"contentCategory",
|
|
23268
|
+
"ctc"
|
|
23269
|
+
],
|
|
23270
|
+
contentGenre: [
|
|
23271
|
+
"contentGenre",
|
|
23272
|
+
"ctgr"
|
|
23273
|
+
],
|
|
23274
|
+
contentLanguage: [
|
|
23275
|
+
"contentLanguage",
|
|
23276
|
+
"ctlg"
|
|
23277
|
+
],
|
|
23278
|
+
contentDuration: [
|
|
23279
|
+
"contentDuration",
|
|
23280
|
+
"ctd"
|
|
23281
|
+
],
|
|
23282
|
+
contentSeason: [
|
|
23283
|
+
"contentSeason",
|
|
23284
|
+
"cts"
|
|
23285
|
+
],
|
|
23286
|
+
contentEpisode: [
|
|
23287
|
+
"contentEpisode",
|
|
23288
|
+
"cte"
|
|
23289
|
+
],
|
|
23290
|
+
contentRating: [
|
|
23291
|
+
"contentRating",
|
|
23292
|
+
"ctr"
|
|
23293
|
+
],
|
|
23294
|
+
contentId: [
|
|
23295
|
+
"contentId",
|
|
23296
|
+
"ctid"
|
|
23261
23297
|
]
|
|
23262
23298
|
};
|
|
23263
23299
|
function sanitizeContentValue(value) {
|
|
@@ -23268,6 +23304,25 @@ function sanitizeContentValue(value) {
|
|
|
23268
23304
|
if (/^(unknown|null|undefined|none|n\/a|-)$/i.test(cleaned)) return void 0;
|
|
23269
23305
|
return cleaned.length > MAX_CONTENT_VALUE_LENGTH ? cleaned.slice(0, MAX_CONTENT_VALUE_LENGTH).trim() : cleaned;
|
|
23270
23306
|
}
|
|
23307
|
+
function sanitizeContentScalar(value) {
|
|
23308
|
+
if (typeof value === "number") {
|
|
23309
|
+
return Number.isFinite(value) ? String(value) : void 0;
|
|
23310
|
+
}
|
|
23311
|
+
return sanitizeContentValue(value);
|
|
23312
|
+
}
|
|
23313
|
+
function normalizeContentLanguage(value) {
|
|
23314
|
+
var cleaned = sanitizeContentValue(value);
|
|
23315
|
+
if (!cleaned) return void 0;
|
|
23316
|
+
var match = cleaned.match(/^([A-Za-z]{2})(?:[-_][A-Za-z0-9]{1,8})*$/);
|
|
23317
|
+
return match && match[1] ? match[1].toLowerCase() : void 0;
|
|
23318
|
+
}
|
|
23319
|
+
function normalizeContentDuration(value) {
|
|
23320
|
+
var raw = sanitizeContentScalar(value);
|
|
23321
|
+
if (raw == null || !/^-?\d+(\.\d+)?$/.test(raw)) return void 0;
|
|
23322
|
+
var seconds = Number(raw);
|
|
23323
|
+
if (seconds === -1) return -1;
|
|
23324
|
+
return seconds > 0 ? Math.round(seconds) : void 0;
|
|
23325
|
+
}
|
|
23271
23326
|
function bridgeSources() {
|
|
23272
23327
|
if (typeof window === "undefined") return [];
|
|
23273
23328
|
var w2 = window;
|
|
@@ -23277,7 +23332,7 @@ function bridgeSources() {
|
|
|
23277
23332
|
w2.stormcloudCtv
|
|
23278
23333
|
].filter(Boolean);
|
|
23279
23334
|
}
|
|
23280
|
-
function
|
|
23335
|
+
function readBridgeValue(keys2, sanitize) {
|
|
23281
23336
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
23282
23337
|
try {
|
|
23283
23338
|
for(var _iterator = bridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -23293,8 +23348,8 @@ function readBridgeContentValue(keys2) {
|
|
|
23293
23348
|
} catch (unused) {
|
|
23294
23349
|
value = void 0;
|
|
23295
23350
|
}
|
|
23296
|
-
var sanitized =
|
|
23297
|
-
if (sanitized) return sanitized;
|
|
23351
|
+
var sanitized = sanitize(value);
|
|
23352
|
+
if (sanitized != null) return sanitized;
|
|
23298
23353
|
}
|
|
23299
23354
|
} catch (err) {
|
|
23300
23355
|
_didIteratorError1 = true;
|
|
@@ -23327,17 +23382,48 @@ function readBridgeContentValue(keys2) {
|
|
|
23327
23382
|
}
|
|
23328
23383
|
return void 0;
|
|
23329
23384
|
}
|
|
23385
|
+
function readBridgeContentValue(keys2) {
|
|
23386
|
+
return readBridgeValue(keys2, sanitizeContentValue);
|
|
23387
|
+
}
|
|
23330
23388
|
function resolveContentMetadata(config2) {
|
|
23331
|
-
var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2;
|
|
23389
|
+
var _sanitizeContentValue, _sanitizeContentValue1, _sanitizeContentValue2, _config2_contentDetails, _sanitizeContentValue3, _sanitizeContentValue4, _sanitizeContentValue5, _normalizeContentLanguage, _normalizeContentDuration, _sanitizeContentScalar, _sanitizeContentScalar1, _sanitizeContentValue6, _sanitizeContentValue7;
|
|
23332
23390
|
var channelName = (_sanitizeContentValue = sanitizeContentValue(config2.channelName)) !== null && _sanitizeContentValue !== void 0 ? _sanitizeContentValue : readBridgeContentValue(BRIDGE_KEYS.channelName);
|
|
23333
23391
|
var programTitle = (_sanitizeContentValue1 = sanitizeContentValue(config2.programTitle)) !== null && _sanitizeContentValue1 !== void 0 ? _sanitizeContentValue1 : readBridgeContentValue(BRIDGE_KEYS.programTitle);
|
|
23334
23392
|
var contentNetwork = (_sanitizeContentValue2 = sanitizeContentValue(config2.contentNetwork)) !== null && _sanitizeContentValue2 !== void 0 ? _sanitizeContentValue2 : readBridgeContentValue(BRIDGE_KEYS.contentNetwork);
|
|
23393
|
+
var details = (_config2_contentDetails = config2.contentDetails) !== null && _config2_contentDetails !== void 0 ? _config2_contentDetails : {};
|
|
23394
|
+
var contentType = (_sanitizeContentValue3 = sanitizeContentValue(details.contentType)) !== null && _sanitizeContentValue3 !== void 0 ? _sanitizeContentValue3 : readBridgeContentValue(BRIDGE_KEYS.contentType);
|
|
23395
|
+
var contentCategory = (_sanitizeContentValue4 = sanitizeContentValue(details.category)) !== null && _sanitizeContentValue4 !== void 0 ? _sanitizeContentValue4 : readBridgeContentValue(BRIDGE_KEYS.contentCategory);
|
|
23396
|
+
var contentGenre = (_sanitizeContentValue5 = sanitizeContentValue(details.genre)) !== null && _sanitizeContentValue5 !== void 0 ? _sanitizeContentValue5 : readBridgeContentValue(BRIDGE_KEYS.contentGenre);
|
|
23397
|
+
var contentLanguage = (_normalizeContentLanguage = normalizeContentLanguage(details.language)) !== null && _normalizeContentLanguage !== void 0 ? _normalizeContentLanguage : readBridgeValue(BRIDGE_KEYS.contentLanguage, normalizeContentLanguage);
|
|
23398
|
+
var contentDurationSeconds = (_normalizeContentDuration = normalizeContentDuration(details.durationSeconds)) !== null && _normalizeContentDuration !== void 0 ? _normalizeContentDuration : readBridgeValue(BRIDGE_KEYS.contentDuration, normalizeContentDuration);
|
|
23399
|
+
var contentSeason = (_sanitizeContentScalar = sanitizeContentScalar(details.season)) !== null && _sanitizeContentScalar !== void 0 ? _sanitizeContentScalar : readBridgeValue(BRIDGE_KEYS.contentSeason, sanitizeContentScalar);
|
|
23400
|
+
var contentEpisode = (_sanitizeContentScalar1 = sanitizeContentScalar(details.episode)) !== null && _sanitizeContentScalar1 !== void 0 ? _sanitizeContentScalar1 : readBridgeValue(BRIDGE_KEYS.contentEpisode, sanitizeContentScalar);
|
|
23401
|
+
var contentRating = (_sanitizeContentValue6 = sanitizeContentValue(details.rating)) !== null && _sanitizeContentValue6 !== void 0 ? _sanitizeContentValue6 : readBridgeContentValue(BRIDGE_KEYS.contentRating);
|
|
23402
|
+
var contentId = (_sanitizeContentValue7 = sanitizeContentValue(details.contentId)) !== null && _sanitizeContentValue7 !== void 0 ? _sanitizeContentValue7 : readBridgeContentValue(BRIDGE_KEYS.contentId);
|
|
23335
23403
|
return _object_spread({}, channelName ? {
|
|
23336
23404
|
channelName: channelName
|
|
23337
23405
|
} : {}, programTitle ? {
|
|
23338
23406
|
programTitle: programTitle
|
|
23339
23407
|
} : {}, contentNetwork ? {
|
|
23340
23408
|
contentNetwork: contentNetwork
|
|
23409
|
+
} : {}, contentType ? {
|
|
23410
|
+
contentType: contentType
|
|
23411
|
+
} : {}, contentCategory ? {
|
|
23412
|
+
contentCategory: contentCategory
|
|
23413
|
+
} : {}, contentGenre ? {
|
|
23414
|
+
contentGenre: contentGenre
|
|
23415
|
+
} : {}, contentLanguage ? {
|
|
23416
|
+
contentLanguage: contentLanguage
|
|
23417
|
+
} : {}, contentDurationSeconds != null ? {
|
|
23418
|
+
contentDurationSeconds: contentDurationSeconds
|
|
23419
|
+
} : {}, contentSeason ? {
|
|
23420
|
+
contentSeason: contentSeason
|
|
23421
|
+
} : {}, contentEpisode ? {
|
|
23422
|
+
contentEpisode: contentEpisode
|
|
23423
|
+
} : {}, contentRating ? {
|
|
23424
|
+
contentRating: contentRating
|
|
23425
|
+
} : {}, contentId ? {
|
|
23426
|
+
contentId: contentId
|
|
23341
23427
|
} : {});
|
|
23342
23428
|
}
|
|
23343
23429
|
function appendMissingContentParams(url, meta) {
|
|
@@ -23449,6 +23535,11 @@ function readBridge(keys2) {
|
|
|
23449
23535
|
}
|
|
23450
23536
|
return void 0;
|
|
23451
23537
|
}
|
|
23538
|
+
function makeForCategory(category) {
|
|
23539
|
+
if (category === "LG TV" || category === "LG Set-Top Box") return "LG";
|
|
23540
|
+
if (category === "Samsung TV") return "Samsung";
|
|
23541
|
+
return void 0;
|
|
23542
|
+
}
|
|
23452
23543
|
function normalizeCategory(value) {
|
|
23453
23544
|
var v2 = cleanString(value);
|
|
23454
23545
|
if (!v2) return void 0;
|
|
@@ -23596,7 +23687,7 @@ function primeDeviceInfo() {
|
|
|
23596
23687
|
return primePromise;
|
|
23597
23688
|
}
|
|
23598
23689
|
function getDeviceInfo() {
|
|
23599
|
-
var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory;
|
|
23690
|
+
var _cleanString, _cleanString1, _ref, _cleanString2, _ref1, _cleanString3, _ref2, _normalizeCategory, _ref3, _cleanString4, _cleanString5;
|
|
23600
23691
|
var platform = platformCache !== null && platformCache !== void 0 ? platformCache : computePlatformInfo();
|
|
23601
23692
|
if (primePromise && !platformCache) {} else {
|
|
23602
23693
|
platformCache = platform;
|
|
@@ -23619,7 +23710,14 @@ function getDeviceInfo() {
|
|
|
23619
23710
|
]),
|
|
23620
23711
|
category: normalizeCategory(readBridge([
|
|
23621
23712
|
"deviceCategory"
|
|
23622
|
-
]))
|
|
23713
|
+
])),
|
|
23714
|
+
make: readBridge([
|
|
23715
|
+
"deviceMake"
|
|
23716
|
+
]),
|
|
23717
|
+
hardwareVersion: readBridge([
|
|
23718
|
+
"deviceHardwareVersion",
|
|
23719
|
+
"hardwareVersion"
|
|
23720
|
+
])
|
|
23623
23721
|
};
|
|
23624
23722
|
var terminalId = (_cleanString = cleanString(host.terminalId)) !== null && _cleanString !== void 0 ? _cleanString : bridge.terminalId;
|
|
23625
23723
|
var hostInternalId = (_cleanString1 = cleanString(host.internalDeviceId)) !== null && _cleanString1 !== void 0 ? _cleanString1 : bridge.internalDeviceId;
|
|
@@ -23632,7 +23730,9 @@ function getDeviceInfo() {
|
|
|
23632
23730
|
bridge.internalDeviceId,
|
|
23633
23731
|
bridge.model,
|
|
23634
23732
|
bridge.firmware,
|
|
23635
|
-
bridge.category
|
|
23733
|
+
bridge.category,
|
|
23734
|
+
bridge.make,
|
|
23735
|
+
bridge.hardwareVersion
|
|
23636
23736
|
];
|
|
23637
23737
|
if (bridgeValues.some(function(v2) {
|
|
23638
23738
|
return v2 !== void 0;
|
|
@@ -23640,12 +23740,18 @@ function getDeviceInfo() {
|
|
|
23640
23740
|
if (hostDeviceInfo) sources.unshift("host");
|
|
23641
23741
|
var internalDeviceId = hostInternalId !== null && hostInternalId !== void 0 ? hostInternalId : platform.internalDeviceId;
|
|
23642
23742
|
var internalDeviceIdSource = hostInternalId ? "host" : platform.internalDeviceIdSource;
|
|
23743
|
+
var make = (_ref3 = (_cleanString4 = cleanString(host.make, 40)) !== null && _cleanString4 !== void 0 ? _cleanString4 : bridge.make) !== null && _ref3 !== void 0 ? _ref3 : makeForCategory(category);
|
|
23744
|
+
var hardwareVersion = (_cleanString5 = cleanString(host.hardwareVersion, 40)) !== null && _cleanString5 !== void 0 ? _cleanString5 : bridge.hardwareVersion;
|
|
23643
23745
|
var sonifiModel = model && category === "Samsung TV" && !/^SAMSUNG-IPTV-/i.test(model) ? "SAMSUNG-IPTV-".concat(model) : model;
|
|
23644
23746
|
return _object_spread_props(_object_spread({
|
|
23645
23747
|
category: category,
|
|
23646
23748
|
categoryCode: CATEGORY_CODES[category]
|
|
23647
|
-
},
|
|
23749
|
+
}, make ? {
|
|
23750
|
+
make: make
|
|
23751
|
+
} : {}, model ? {
|
|
23648
23752
|
model: model
|
|
23753
|
+
} : {}, hardwareVersion ? {
|
|
23754
|
+
hardwareVersion: hardwareVersion
|
|
23649
23755
|
} : {}, sonifiModel ? {
|
|
23650
23756
|
sonifiModel: sonifiModel
|
|
23651
23757
|
} : {}, firmware ? {
|
|
@@ -24086,24 +24192,24 @@ function readNativeBridgeSignals() {
|
|
|
24086
24192
|
try {
|
|
24087
24193
|
for(var _iterator = getNativeBridgeSources()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
24088
24194
|
var source = _step.value;
|
|
24089
|
-
var contentUrl =
|
|
24195
|
+
var contentUrl = readBridgeValue2(source, [
|
|
24090
24196
|
"contentUrl",
|
|
24091
24197
|
"url",
|
|
24092
24198
|
"videoUrl",
|
|
24093
24199
|
"canonicalUrl"
|
|
24094
24200
|
]) || void 0;
|
|
24095
|
-
var appId =
|
|
24201
|
+
var appId = readBridgeValue2(source, [
|
|
24096
24202
|
"appId",
|
|
24097
24203
|
"msid",
|
|
24098
24204
|
"applicationId",
|
|
24099
24205
|
"packageName"
|
|
24100
24206
|
]) || void 0;
|
|
24101
|
-
var appName =
|
|
24207
|
+
var appName = readBridgeValue2(source, [
|
|
24102
24208
|
"appName",
|
|
24103
24209
|
"an",
|
|
24104
24210
|
"applicationName"
|
|
24105
24211
|
]) || void 0;
|
|
24106
|
-
var deviceId =
|
|
24212
|
+
var deviceId = readBridgeValue2(source, [
|
|
24107
24213
|
"rdid",
|
|
24108
24214
|
"ifa",
|
|
24109
24215
|
"advertisingId",
|
|
@@ -24117,7 +24223,7 @@ function readNativeBridgeSignals() {
|
|
|
24117
24223
|
"aaid"
|
|
24118
24224
|
]) || void 0;
|
|
24119
24225
|
if (!contentUrl && !deviceId && !appId && !appName) continue;
|
|
24120
|
-
var deviceIdType =
|
|
24226
|
+
var deviceIdType = readBridgeValue2(source, [
|
|
24121
24227
|
"idtype",
|
|
24122
24228
|
"deviceIdType",
|
|
24123
24229
|
"advertisingIdType",
|
|
@@ -24174,7 +24280,7 @@ function getNativeBridgeSources() {
|
|
|
24174
24280
|
window.amazon
|
|
24175
24281
|
].filter(Boolean);
|
|
24176
24282
|
}
|
|
24177
|
-
function
|
|
24283
|
+
function readBridgeValue2(source, keys2) {
|
|
24178
24284
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
24179
24285
|
try {
|
|
24180
24286
|
for(var _iterator = keys2[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -24302,6 +24408,33 @@ function normalizeBoolean(value) {
|
|
|
24302
24408
|
}
|
|
24303
24409
|
return void 0;
|
|
24304
24410
|
}
|
|
24411
|
+
// src/utils/partnerSignals.ts
|
|
24412
|
+
var PLATFORM_IFA_TYPES = /* @__PURE__ */ new Set([
|
|
24413
|
+
"aaid",
|
|
24414
|
+
"adid",
|
|
24415
|
+
"afai",
|
|
24416
|
+
"idfa",
|
|
24417
|
+
"lgudid",
|
|
24418
|
+
"msai",
|
|
24419
|
+
"rida",
|
|
24420
|
+
"tifa",
|
|
24421
|
+
"tvos",
|
|
24422
|
+
"vaid",
|
|
24423
|
+
"vida"
|
|
24424
|
+
]);
|
|
24425
|
+
function toIabIfaType(deviceIdType, source) {
|
|
24426
|
+
if (!deviceIdType) return void 0;
|
|
24427
|
+
var type3 = deviceIdType.trim().toLowerCase();
|
|
24428
|
+
if (source === "generated") return "sessionid";
|
|
24429
|
+
if (PLATFORM_IFA_TYPES.has(type3)) return type3;
|
|
24430
|
+
if (source === "platform") return "dpid";
|
|
24431
|
+
return "ppid";
|
|
24432
|
+
}
|
|
24433
|
+
function playbackMethodCode(autoPlay, muted) {
|
|
24434
|
+
if (autoPlay === false) return 3;
|
|
24435
|
+
if (autoPlay !== true || muted == null) return void 0;
|
|
24436
|
+
return muted ? 2 : 1;
|
|
24437
|
+
}
|
|
24305
24438
|
// src/utils/vastMacros.ts
|
|
24306
24439
|
var INVALID_VAST_PARAM_KEY = /^\s|\s$/;
|
|
24307
24440
|
function removeBrokenAppNameOrphans(params, appName) {
|
|
@@ -24413,6 +24546,8 @@ function resolveScvpMacroValues(ctx) {
|
|
|
24413
24546
|
set3("RDID", deviceId);
|
|
24414
24547
|
set3("IDTYPE", deviceIdType);
|
|
24415
24548
|
set3("IS-LAT", (_toFlag = toFlag(ctx.limitAdTracking)) !== null && _toFlag !== void 0 ? _toFlag : "0");
|
|
24549
|
+
set3("IFA", deviceId);
|
|
24550
|
+
set3("IFA-TYPE", toIabIfaType(deviceIdType, ctx.deviceIdSource));
|
|
24416
24551
|
}
|
|
24417
24552
|
set3("SID", ctx.sessionId);
|
|
24418
24553
|
set3("DTH", ctx.deviceTypeHint);
|
|
@@ -24430,6 +24565,26 @@ function resolveScvpMacroValues(ctx) {
|
|
|
24430
24565
|
set3("GDPR", (_ctx_consent = ctx.consent) === null || _ctx_consent === void 0 ? void 0 : _ctx_consent.gdpr);
|
|
24431
24566
|
set3("GDPR-CONSENT", (_ctx_consent1 = ctx.consent) === null || _ctx_consent1 === void 0 ? void 0 : _ctx_consent1.gdprConsent);
|
|
24432
24567
|
set3("US-PRIVACY", (_ctx_consent2 = ctx.consent) === null || _ctx_consent2 === void 0 ? void 0 : _ctx_consent2.usPrivacy);
|
|
24568
|
+
set3("PLAYER-WIDTH", ctx.playerWidth);
|
|
24569
|
+
set3("PLAYER-HEIGHT", ctx.playerHeight);
|
|
24570
|
+
set3("TIMESTAMP", ctx.timestamp);
|
|
24571
|
+
set3("LIVE", toFlag(ctx.isLive));
|
|
24572
|
+
set3("VPMT", playbackMethodCode(ctx.isCtv ? true : ctx.adWillAutoPlay, ctx.adWillPlayMuted));
|
|
24573
|
+
set3("DEVICE-MAKE", ctx.deviceMake);
|
|
24574
|
+
set3("DEVICE-MODEL", ctx.deviceModel);
|
|
24575
|
+
set3("DEVICE-HWV", ctx.deviceHardwareVersion);
|
|
24576
|
+
set3("UA", ctx.userAgent);
|
|
24577
|
+
set3("IP", ctx.ipAddress);
|
|
24578
|
+
set3("UID", ctx.userId);
|
|
24579
|
+
set3("CT-TYPE", ctx.contentType);
|
|
24580
|
+
set3("CT-CATEGORY", ctx.contentCategory);
|
|
24581
|
+
set3("CT-GENRE", ctx.contentGenre);
|
|
24582
|
+
set3("CT-LANGUAGE", ctx.contentLanguage);
|
|
24583
|
+
set3("CT-DURATION", ctx.contentDurationSeconds != null ? ctx.contentDurationSeconds : ctx.isLive ? -1 : void 0);
|
|
24584
|
+
set3("CT-SEASON", ctx.contentSeason);
|
|
24585
|
+
set3("CT-EPISODE", ctx.contentEpisode);
|
|
24586
|
+
set3("CT-RATING", ctx.contentRating);
|
|
24587
|
+
set3("CT-ID", ctx.contentId);
|
|
24433
24588
|
return values;
|
|
24434
24589
|
}
|
|
24435
24590
|
var keepNone = function keepNone() {
|