diff --git a/@types/conviva/ConvivaExtension.d.ts b/@types/conviva/ConvivaExtension.d.ts index d6e747b..5334756 100644 --- a/@types/conviva/ConvivaExtension.d.ts +++ b/@types/conviva/ConvivaExtension.d.ts @@ -1,5 +1,6 @@ /** - * Add missing types from `conviva-core-sdk` package. + * The following properties exist in the `window.Conviva` object but they are missing + * in types of `conviva-core-sdk` package for some reason, so let's add them manually. */ declare module Conviva { @@ -14,8 +15,6 @@ declare module Conviva { public streamType: Conviva.valueof; public streamUrl: string; public viewerId: string; - public frameworkVersion: string; - public framework: string; } interface LoggingInterface { diff --git a/CHANGELOG.md b/CHANGELOG.md index 879d3b6..6b1bd84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Changed +- Updated Conviva types to the latest version and fixed some type issues + +### Deprecated +- Removed `framework` and `frameworkVersion` custom metadata fields (custom tags) + ## 4.2.0 - 2023-08-24 ### Added - Support for Conviva-SDK version 4.7.0 diff --git a/spec/tests/PlayerEvents.spec.ts b/spec/tests/PlayerEvents.spec.ts index fbc7571..20e72fe 100644 --- a/spec/tests/PlayerEvents.spec.ts +++ b/spec/tests/PlayerEvents.spec.ts @@ -240,7 +240,6 @@ describe('player event tests', () => { expect(convivaVideoAnalytics.reportAdBreakStarted).toHaveBeenCalledWith( Conviva.Constants.AdType.CLIENT_SIDE, Conviva.Constants.AdPlayer.SEPARATE, - Conviva.Constants.AdPosition.PREROLL, ); }); @@ -251,7 +250,6 @@ describe('player event tests', () => { expect(convivaVideoAnalytics.reportAdBreakStarted).toHaveBeenCalledWith( Conviva.Constants.AdType.CLIENT_SIDE, Conviva.Constants.AdPlayer.SEPARATE, - Conviva.Constants.AdPosition.MIDROLL, ); }); diff --git a/src/ts/ContentMetadataBuilder.ts b/src/ts/ContentMetadataBuilder.ts index 7b728a0..938b958 100644 --- a/src/ts/ContentMetadataBuilder.ts +++ b/src/ts/ContentMetadataBuilder.ts @@ -71,8 +71,6 @@ export class ContentMetadataBuilder { this.contentMetadata.streamType = this.metadataOverrides.streamType || this.metadata.streamType; this.contentMetadata.applicationName = this.metadataOverrides.applicationName || this.metadata.applicationName; this.contentMetadata.duration = this.metadataOverrides.duration || this.metadata.duration; - this.contentMetadata.framework = this.metadataOverrides.framework || this.metadata.framework; - this.contentMetadata.frameworkVersion = this.metadataOverrides.frameworkVersion || this.metadata.frameworkVersion; this.contentMetadata.custom = this.custom; } @@ -91,15 +89,10 @@ export class ContentMetadataBuilder { [Conviva.Constants.VIEWER_ID]: this.contentMetadata.viewerId || 'GET_VIEWER_ID_FROM_PLAYER', [Conviva.Constants.PLAYER_NAME]: this.contentMetadata.applicationName || 'GET_PLAYER_NAME_OR_TYPE', }; - const customContentInfo: CustomContentMetadata = { - [Conviva.Constants.FRAMEWORK_NAME]: this.contentMetadata.framework, - [Conviva.Constants.FRAMEWORK_VERSION]: this.contentMetadata.frameworkVersion, - ...this.contentMetadata.custom, - }; return { ...convivaContentInfo, - ...customContentInfo, + ...this.contentMetadata.custom, } as Conviva.ConvivaMetadata; } diff --git a/src/ts/ConvivaAnalytics.ts b/src/ts/ConvivaAnalytics.ts index e8b4318..a635095 100644 --- a/src/ts/ConvivaAnalytics.ts +++ b/src/ts/ConvivaAnalytics.ts @@ -354,7 +354,6 @@ export class ConvivaAnalytics { this.convivaVideoAnalytics.reportAdBreakStarted( Conviva.Constants.AdType.CLIENT_SIDE, Conviva.Constants.AdPlayer.SEPARATE, - // Conviva.Constants.AdPosition.PREROLL, ); this.debugLog('Tracking paused.'); } @@ -700,7 +699,6 @@ export class ConvivaAnalytics { this.convivaVideoAnalytics.reportAdBreakStarted( Conviva.Constants.AdType.CLIENT_SIDE, Conviva.Constants.AdPlayer.SEPARATE, - // adPosition, ); };