Skip to content

Commit

Permalink
Fix types in Conviva
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Jun 4, 2024
1 parent f5e82b7 commit 1bd7fc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions conviva/src/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1bd7fc4

Please sign in to comment.