Skip to content

Commit

Permalink
feat: add VO metadata to servers and EVS
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusAlbrektsen committed Nov 23, 2023
1 parent ecbd688 commit 362f559
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/tv2-common/onTimelineGenerate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -62,6 +63,7 @@ export type TimelineBlueprintExt = TSR.TSRTimelineObjBase & {
export interface PieceMetaData {
type: Tv2PieceType
outputLayer?: Tv2OutputLayer
audioMode?: Tv2AudioMode
sisyfosPersistMetaData?: SisyfosPersistenceMetaData
mediaPlayerSessions?: string[]
modifiedByAction?: boolean
Expand Down
25 changes: 15 additions & 10 deletions src/tv2-common/parts/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 4 additions & 0 deletions src/tv2-constants/tv2-audio.mode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export enum Tv2AudioMode {
FULL = 'FULL',
VOICE_OVER = 'VOICE_OVER'
}
2 changes: 2 additions & 0 deletions src/tv2_afvd_showstyle/parts/evs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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: []
}
Expand Down

0 comments on commit 362f559

Please sign in to comment.