Skip to content

Commit

Permalink
Remove custom metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
karpov-kir committed May 15, 2024
1 parent 8d8d085 commit 04a0c70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions @types/conviva/ConvivaExtension.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,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
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

0 comments on commit 04a0c70

Please sign in to comment.