From 1a2d8661581ed0ab0e419ec9696a30e57c167a29 Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Thu, 14 Nov 2024 13:11:25 +0100 Subject: [PATCH 1/5] Fix broken test pages --- conviva/test/pages/main_esm.html | 8 +++++--- conviva/test/pages/main_umd.html | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conviva/test/pages/main_esm.html b/conviva/test/pages/main_esm.html index 8fd06d34..36b03565 100644 --- a/conviva/test/pages/main_esm.html +++ b/conviva/test/pages/main_esm.html @@ -3,8 +3,10 @@ Connector test page - - + + + +
@@ -15,7 +17,7 @@ ui: { fluid: true }, - libraryLocation: '/node_modules/theoplayer/', + libraryLocation: './../../../node_modules/theoplayer/', license: "CUSTOMER_LICENSE_GOES_HERE" }); diff --git a/conviva/test/pages/main_umd.html b/conviva/test/pages/main_umd.html index d3146abf..9b4b3269 100644 --- a/conviva/test/pages/main_umd.html +++ b/conviva/test/pages/main_umd.html @@ -3,9 +3,10 @@ Connector test page - - - + + + + @@ -16,8 +17,8 @@ ui: { fluid: true }, - libraryLocation: '/node_modules/theoplayer/', license: "CUSTOMER_LICENSE_GOES_HERE" + libraryLocation: './../../../node_modules/theoplayer/', }); const srcUrl = 'https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8'; From b5594a3c6d82066fbc54092a13171ba9daee4f65 Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Thu, 14 Nov 2024 13:11:55 +0100 Subject: [PATCH 2/5] Add Server Guided ad technology --- conviva/src/integration/ads/AdReporter.ts | 3 ++- conviva/src/utils/Utils.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conviva/src/integration/ads/AdReporter.ts b/conviva/src/integration/ads/AdReporter.ts index c375d670..f2640155 100644 --- a/conviva/src/integration/ads/AdReporter.ts +++ b/conviva/src/integration/ads/AdReporter.ts @@ -5,6 +5,7 @@ import { calculateCurrentAdBreakInfo, collectAdMetadata, collectPlayerInfo, + isServerGuidedAd, updateAdMetadataForGoogleIma } from '../../utils/Utils'; @@ -67,7 +68,7 @@ export class AdReporter { this.contentInfo()[Constants.ASSET_NAME] ?? this.player.source?.metadata?.title ?? 'NA'; // [Required] The ad technology as CLIENT_SIDE/SERVER_SIDE - adMetadata['c3.ad.technology'] = calculateAdType(currentAd); + adMetadata['c3.ad.technology'] = isServerGuidedAd(currentAd) ? 'Server Guided' : calculateAdType(currentAd); this.convivaAdAnalytics.setAdInfo(adMetadata); this.convivaAdAnalytics.reportAdLoaded(adMetadata); diff --git a/conviva/src/utils/Utils.ts b/conviva/src/utils/Utils.ts index ac8c2a04..7448c838 100644 --- a/conviva/src/utils/Utils.ts +++ b/conviva/src/utils/Utils.ts @@ -28,6 +28,10 @@ export function collectDeviceMetadata(): ConvivaDeviceMetadata { }; } +export function isServerGuidedAd(adOrBreak: Ad | AdBreak) { + return adOrBreak.integration === 'theoads'; +} + export function calculateAdType(adOrBreak: Ad | AdBreak) { switch (adOrBreak.integration) { case 'theoads': { From e35f4de67edaa3e0d378af46d60a84dca6635a0c Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Thu, 14 Nov 2024 15:09:52 +0100 Subject: [PATCH 3/5] Add changeset --- .changeset/three-cherries-swim.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/three-cherries-swim.md diff --git a/.changeset/three-cherries-swim.md b/.changeset/three-cherries-swim.md new file mode 100644 index 00000000..4bcc4f31 --- /dev/null +++ b/.changeset/three-cherries-swim.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/conviva-connector-web": minor +--- + +Added 'Server Guided' ad technology. From 891b91dfdaecd6bd652f797c72aea412ae6a0258 Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Thu, 14 Nov 2024 15:26:51 +0100 Subject: [PATCH 4/5] Add comment --- conviva/src/integration/ads/AdReporter.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/conviva/src/integration/ads/AdReporter.ts b/conviva/src/integration/ads/AdReporter.ts index f2640155..29392c18 100644 --- a/conviva/src/integration/ads/AdReporter.ts +++ b/conviva/src/integration/ads/AdReporter.ts @@ -68,6 +68,7 @@ export class AdReporter { this.contentInfo()[Constants.ASSET_NAME] ?? this.player.source?.metadata?.title ?? 'NA'; // [Required] The ad technology as CLIENT_SIDE/SERVER_SIDE + // SGAI isn't officially supported by conviva yet, overwrite with our own string for now. adMetadata['c3.ad.technology'] = isServerGuidedAd(currentAd) ? 'Server Guided' : calculateAdType(currentAd); this.convivaAdAnalytics.setAdInfo(adMetadata); From de0bc43d73bf477343c6ce75e61f9e85a9866b86 Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Thu, 14 Nov 2024 15:27:25 +0100 Subject: [PATCH 5/5] Fix order --- conviva/test/pages/main_umd.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conviva/test/pages/main_umd.html b/conviva/test/pages/main_umd.html index 9b4b3269..e9e7b47b 100644 --- a/conviva/test/pages/main_umd.html +++ b/conviva/test/pages/main_umd.html @@ -17,8 +17,8 @@ ui: { fluid: true }, - license: "CUSTOMER_LICENSE_GOES_HERE" libraryLocation: './../../../node_modules/theoplayer/', + license: "CUSTOMER_LICENSE_GOES_HERE" }); const srcUrl = 'https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8';