From 1bd7fc4030f046e35180b229135a0aee716d9ff8 Mon Sep 17 00:00:00 2001 From: Mattias Buelens Date: Tue, 4 Jun 2024 18:04:28 +0200 Subject: [PATCH] Fix types in Conviva --- conviva/src/utils/Utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conviva/src/utils/Utils.ts b/conviva/src/utils/Utils.ts index 6bccea56..99c6b7b5 100644 --- a/conviva/src/utils/Utils.ts +++ b/conviva/src/utils/Utils.ts @@ -91,12 +91,13 @@ export function collectContentMetadata( export function collectYospaceAdMetadata(player: ChromelessPlayer, ad: AdVert): ConvivaMetadata { return { - [Constants.ASSET_NAME]: ad.getProperty('AdTitle')?.getValue(), + // Cast to `any` because the index signature in ConvivaMetadata conflicts with its other properties... + [Constants.ASSET_NAME]: (ad.getProperty('AdTitle')?.getValue() ?? null) as any, [Constants.STREAM_URL]: player.src!, [Constants.DURATION]: (ad.getDuration() / 1000) as any, 'c3.ad.technology': Constants.AdType.SERVER_SIDE, 'c3.ad.id': ad.getIdentifier(), - 'c3.ad.system': ad.getProperty('AdSystem')?.getValue(), + 'c3.ad.system': (ad.getProperty('AdSystem')?.getValue() ?? null) as any, 'c3.ad.isSlate': ad.isFiller() ? 'true' : 'false', 'c3.ad.mediaFileApiFramework': 'NA', 'c3.ad.adStitcher': 'YoSpace',