@playkit-js/taxonomy-transcript
Version:
Custom transcript plugin that displays taxonomy information in addition to the transcript
46 lines (37 loc) • 1.15 kB
text/typescript
type KalturaMetadata = {
id: number;
objectId?: string;
xml: string;
relatedObjects?: object;
};
type KalturaCuePoint = {
startTime: number;
endTime?: number;
id: string;
type: string;
text?: string;
};
type KalturaListResponse<T, U> = {
objectType: U;
objects: T[];
totalCount: number;
};
type KalturaTranscriptAsset = {
humanVerified: boolean;
entryId: string;
id: string;
};
type MetadataRelatedObject = Record<'metadata', KalturaListResponse<KalturaMetadata, 'KalturaMetadataListResponse'>>;
type MentionedTermsRelatedObject = KalturaListResponse<KalturaCuePoint, 'KalturaCuePointListResponse'>;
type TranscriptAssetsRelatedObject = KalturaListResponse<KalturaTranscriptAsset, 'KalturaTranscriptAssetListResponse'>;
export type KalturaMediaEntry = {
id: string;
objectType: 'KalturaMediaEntry';
referenceId: string;
relatedObjects: {
metadata?: MetadataRelatedObject;
mentionedTerm?: MentionedTermsRelatedObject;
transcriptAsset?: TranscriptAssetsRelatedObject;
};
};
export type KalturaBaseEntryListResponse = KalturaListResponse<KalturaMediaEntry, 'KalturaBaseEntryListResponse'>;