Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/TA-2596-su…
Browse files Browse the repository at this point in the history
…pport-advertising-tags
  • Loading branch information
karpov-kir committed May 15, 2024
2 parents ee0566b + 87682ab commit 839d6aa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
5 changes: 2 additions & 3 deletions @types/conviva/ConvivaExtension.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -14,8 +15,6 @@ declare module Conviva {
public streamType: Conviva.valueof<Conviva.ConvivaConstants['StreamType']>;
public streamUrl: string;
public viewerId: string;
public frameworkVersion: string;
public framework: string;
}

interface LoggingInterface {
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions spec/tests/PlayerEvents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
});

Expand All @@ -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,
);
});

Expand Down
9 changes: 1 addition & 8 deletions src/ts/ContentMetadataBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions src/ts/ConvivaAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down Expand Up @@ -700,7 +699,6 @@ export class ConvivaAnalytics {
this.convivaVideoAnalytics.reportAdBreakStarted(
Conviva.Constants.AdType.CLIENT_SIDE,
Conviva.Constants.AdPlayer.SEPARATE,
// adPosition,
);
};

Expand Down

0 comments on commit 839d6aa

Please sign in to comment.