diff --git a/.changeset/fresh-turkeys-hang.md b/.changeset/fresh-turkeys-hang.md new file mode 100644 index 00000000..247a10f5 --- /dev/null +++ b/.changeset/fresh-turkeys-hang.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/nielsen-connector-web": minor +--- + +Added an optional c4 parameter to `NielsenDCRContentMetadataCZ`. diff --git a/nielsen/src/nielsen/Types.ts b/nielsen/src/nielsen/Types.ts index 049fba98..d480836b 100644 --- a/nielsen/src/nielsen/Types.ts +++ b/nielsen/src/nielsen/Types.ts @@ -129,6 +129,12 @@ export type NielsenDCRContentMetadataCZ = NielsenDCRContentMetadata & { * [LIVE] Keep empty : "nol_c2":"p2," */ c2?: string; + /* + * The actual duration of the live broadcast + * [VOD] Keep empty + * [LIVE] Pass the duration of the live broadcast in seconds + */ + c4?: string; /* * CMS tag helper item. Indication of whether the content being played supports the insertion of advertisements. “0” – No ads “1” – Supports ads “2” – Don't know (default). */ @@ -162,6 +168,12 @@ export type DCRContentMetadataCZ = DCRContentMetadata & { * [LIVE] Keep empty : "nol_c2":"p2," */ nol_c2?: string; + /* + * The actual duration of the live broadcast + * [VOD] Keep empty + * [LIVE] Pass the value in seconds as follows "nol_c4" : "p4,value_in_seconds" + */ + nol_c4?: string; /* * CMS tag helper item. Indication of whether the content being played supports the insertion of advertisements. “0” – No ads “1” – Supports ads “2” – Don't know (default). */ diff --git a/nielsen/src/utils/Util.ts b/nielsen/src/utils/Util.ts index a0d5da2c..f2c3b3a4 100644 --- a/nielsen/src/utils/Util.ts +++ b/nielsen/src/utils/Util.ts @@ -41,16 +41,17 @@ export function buildDCRContentMetadata( adloadtype: metadata.adloadtype }; if (country === NielsenCountry.CZ) { - const { crossId1, segB, segC, c1, c2, hasAds } = metadata as NielsenDCRContentMetadataCZ; + const { crossId1, segB, segC, c1, c2, c4, hasAds } = metadata as NielsenDCRContentMetadataCZ; const dcrContentMetadataCZ: DCRContentMetadataCZ = { ...dcrContentMetadata, ['crossId1']: crossId1, + ['nol_c1']: `p1,${c1 ?? ''}`, ['nol_c2']: `p2,${c2 ?? ''}`, + ['nol_c4']: `p4,${c4 ?? ''}`, segB: segB, segC: segC ?? '', hasAds: hasAds }; - if (c1) dcrContentMetadataCZ['nol_c1'] = `p1,${c1}`; return dcrContentMetadataCZ; } if (country === NielsenCountry.US) {