Skip to content

Commit

Permalink
Add default layers and channels for caspar media
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Jan 10, 2024
1 parent 2e6cf42 commit 64bbfbd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion plugins/caspar/app/components/LibraryListItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ import './style.css'

const DEFAULT_DURATION_MS = 5000

const DEFAULT_VALUES = {
STILL: {
channel: 1,
layer: 10
},
MOVIE: {
channel: 1,
layer: 10
},
AUDIO: {
channel: 1,
layer: 30
}
}

/**
* Calculate the duration in milliseconds from an item
* based on its framerate and duration in frames
Expand Down Expand Up @@ -36,7 +51,8 @@ export const LibraryListItem = ({ item = {} }) => {
name: item.name,
caspar: {
server: item?._filter?.serverId,
target: item.name
target: item.name,
...(DEFAULT_VALUES[item.type] || {})
},
duration: calculateDurationMs(item)
}
Expand Down

0 comments on commit 64bbfbd

Please sign in to comment.