Skip to content
Snippets Groups Projects
Commit 5d4e257a authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: add playout store

refs #127
parent 72b38177
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ export { useLicenseStore } from '@/stores/licenses'
export { useNoteStore } from '@/stores/notes'
export { usePlaylistStore } from '@/stores/playlists'
export { useFilesStore } from '@/stores/files'
export { usePlayoutStore } from '@/stores/playout'
export { useScheduleStore } from '@/stores/schedules'
export { useShowStore } from '@/stores/shows'
export { useTimeSlotStore } from '@/stores/timeslots'
......
import { defineStore } from 'pinia'
import { computed, MaybeRefOrGetter, toValue } from 'vue'
type Input = {
uri: string
label: string
description?: string
}
export function useInput(uri: MaybeRefOrGetter<string>) {
const playoutStore = usePlayoutStore()
return computed(() => playoutStore.inputs.find((i) => i.uri === toValue(uri)) ?? null)
}
export const usePlayoutStore = defineStore('playout', () => {
// These are hard-coded in engine-core as well
// See playout config: https://gitlab.servus.at/aura/engine-core/-/blob/40e7c86373a0029e4db9fd98295997017a92a9e3/config/sample.engine-core.ini#L73
// see playout source: https://gitlab.servus.at/aura/engine-core/-/blob/40e7c86373a0029e4db9fd98295997017a92a9e3/src/in_soundcard.liq#L83-105
const inputs: Input[] = [
{ uri: 'line://0', label: 'Studio' },
{ uri: 'line://1', label: 'Pre-Production' },
{ uri: 'line://2', label: 'Line 2' },
]
return {
inputs,
}
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment