From 362f5599c79c193079797777529431ba12fb880e Mon Sep 17 00:00:00 2001 From: Rasmus Date: Thu, 23 Nov 2023 13:26:43 +0100 Subject: [PATCH] feat: add VO metadata to servers and EVS --- src/tv2-common/onTimelineGenerate.ts | 2 ++ src/tv2-common/parts/server.ts | 25 +++++++++++++++---------- src/tv2-constants/tv2-audio.mode.ts | 4 ++++ src/tv2_afvd_showstyle/parts/evs.ts | 2 ++ 4 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 src/tv2-constants/tv2-audio.mode.ts diff --git a/src/tv2-common/onTimelineGenerate.ts b/src/tv2-common/onTimelineGenerate.ts index b4689252..09f89c42 100644 --- a/src/tv2-common/onTimelineGenerate.ts +++ b/src/tv2-common/onTimelineGenerate.ts @@ -22,6 +22,7 @@ import { } from 'tv2-common' import { AbstractLLayer, PartType, SharedSisyfosLLayer, TallyTags } from 'tv2-constants' import * as _ from 'underscore' +import {Tv2AudioMode} from "../tv2-constants/tv2-audio.mode"; import { Tv2OutputLayer } from '../tv2-constants/tv2-output-layer' import { Tv2PieceType } from '../tv2-constants/tv2-piece-type' import { TV2BlueprintConfigBase, TV2StudioConfigBase } from './blueprintConfig' @@ -62,6 +63,7 @@ export type TimelineBlueprintExt = TSR.TSRTimelineObjBase & { export interface PieceMetaData { type: Tv2PieceType outputLayer?: Tv2OutputLayer + audioMode?: Tv2AudioMode sisyfosPersistMetaData?: SisyfosPersistenceMetaData mediaPlayerSessions?: string[] modifiedByAction?: boolean diff --git a/src/tv2-common/parts/server.ts b/src/tv2-common/parts/server.ts index ac2770bb..dcd6b85e 100644 --- a/src/tv2-common/parts/server.ts +++ b/src/tv2-common/parts/server.ts @@ -16,16 +16,17 @@ import { ServerPieceMetaData, ShowStyleContext } from 'tv2-common' -import { AdlibActionType, PartType, SharedOutputLayer, TallyTags } from 'tv2-constants' -import { Tv2OutputLayer } from '../../tv2-constants/tv2-output-layer' -import { Tv2PieceType } from '../../tv2-constants/tv2-piece-type' -import { ActionSelectServerClip } from '../actions' -import { TV2BlueprintConfigBase, TV2StudioConfigBase } from '../blueprintConfig' -import { getSourceDuration, GetVTContentProperties } from '../content' -import { getServerSeek, ServerPosition, ServerSelectMode } from '../helpers' -import { PartDefinition } from '../inewsConversion' -import { SanitizeString } from '../util' -import { CreatePartInvalid } from './invalid' +import {AdlibActionType, PartType, SharedOutputLayer, SharedSourceLayer, TallyTags} from 'tv2-constants' +import {Tv2AudioMode} from "../../tv2-constants/tv2-audio.mode"; +import {Tv2OutputLayer} from '../../tv2-constants/tv2-output-layer' +import {Tv2PieceType} from '../../tv2-constants/tv2-piece-type' +import {ActionSelectServerClip} from '../actions' +import {TV2BlueprintConfigBase, TV2StudioConfigBase} from '../blueprintConfig' +import {getSourceDuration, GetVTContentProperties} from '../content' +import {getServerSeek, ServerPosition, ServerSelectMode} from '../helpers' +import {PartDefinition} from '../inewsConversion' +import {SanitizeString} from '../util' +import {CreatePartInvalid} from './invalid' export interface ServerPartProps { voLayer: boolean @@ -232,6 +233,8 @@ function getServerSelectionBlueprintPiece( metaData: { type: Tv2PieceType.VIDEO_CLIP, outputLayer: Tv2OutputLayer.PROGRAM, + audioMode: + layers.SourceLayer.SelectedServer === SharedSourceLayer.SelectedVoiceOver ? Tv2AudioMode.VOICE_OVER : undefined, mediaPlayerSessions: [contentProps.mediaPlayerSession], userData: userDataElement, sisyfosPersistMetaData: { @@ -265,6 +268,8 @@ function getPgmBlueprintPiece< metaData: { type: Tv2PieceType.VIDEO_CLIP, outputLayer: Tv2OutputLayer.PROGRAM, + audioMode: + layers.SourceLayer.SelectedServer === SharedSourceLayer.SelectedVoiceOver ? Tv2AudioMode.VOICE_OVER : undefined, mediaPlayerSessions: [contentProps.mediaPlayerSession] }, content: { diff --git a/src/tv2-constants/tv2-audio.mode.ts b/src/tv2-constants/tv2-audio.mode.ts new file mode 100644 index 00000000..dd3e3166 --- /dev/null +++ b/src/tv2-constants/tv2-audio.mode.ts @@ -0,0 +1,4 @@ +export enum Tv2AudioMode { + FULL = 'FULL', + VOICE_OVER = 'VOICE_OVER' +} diff --git a/src/tv2_afvd_showstyle/parts/evs.ts b/src/tv2_afvd_showstyle/parts/evs.ts index 7ee5e93f..960778a2 100644 --- a/src/tv2_afvd_showstyle/parts/evs.ts +++ b/src/tv2_afvd_showstyle/parts/evs.ts @@ -23,6 +23,7 @@ import { TransitionStyle } from 'tv2-common' import { SharedOutputLayer } from 'tv2-constants' +import { Tv2AudioMode } from '../../tv2-constants/tv2-audio.mode' import { Tv2OutputLayer } from '../../tv2-constants/tv2-output-layer' import { Tv2PieceType } from '../../tv2-constants/tv2-piece-type' import { GalleryBlueprintConfig } from '../helpers/config' @@ -68,6 +69,7 @@ export async function CreatePartEVS( metaData: { type: Tv2PieceType.REPLAY, outputLayer: Tv2OutputLayer.PROGRAM, + audioMode: partDefinition.sourceDefinition.vo ? Tv2AudioMode.VOICE_OVER : undefined, sisyfosPersistMetaData: { sisyfosLayers: [] }