diff --git a/components/PlayerControl.vue b/components/PlayerControl.vue
index d59ce3ff..4a9f3b3f 100644
--- a/components/PlayerControl.vue
+++ b/components/PlayerControl.vue
@@ -66,6 +66,11 @@
{{ $t('player.in') }}: {{ secToHMS(playlistStore.currentClipIn) }} |
{{ $t('player.out') }}:
{{ secToHMS(playlistStore.currentClipOut) }}
+
+
+ | {{ $t('player.shift') }}:
+ {{ secToHMS(playlistStore.shift) }}
+
@@ -76,7 +71,7 @@
@@ -226,7 +221,6 @@ useHead({
const { listDate } = storeToRefs(usePlaylist())
-const todayDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD'))
const targetDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD'))
const playlistTable = ref()
const editId = ref(-1)
@@ -256,34 +250,10 @@ const newSource = ref({
uid: '',
} as PlaylistItem)
-function scrollTo(index: number) {
- const child = document.getElementById(`clip-${index}`)
- const parent = document.getElementById('playlist-container')
-
- if (child && parent) {
- const topPos = child.offsetTop
- parent.scrollTop = topPos - 50
- }
-}
-
const calendarFormat = (date: Date) => {
return $dayjs(date).locale(locale.value).format('dddd - LL')
}
-async function getPlaylist() {
- playlistStore.isLoading = true
- await playlistStore.getPlaylist(listDate.value)
- playlistStore.isLoading = false
-
- if (listDate.value === todayDate.value) {
- scrollTo(playlistStore.currentClipIndex)
- } else {
- scrollTo(0)
- }
-
- playlistTable.value.classSwitcher()
-}
-
function closeGenerator() {
showPlaylistGenerator.value = false
}
diff --git a/stores/playlist.ts b/stores/playlist.ts
index e3c6c371..4c75361a 100644
--- a/stores/playlist.ts
+++ b/stores/playlist.ts
@@ -22,7 +22,8 @@ export const usePlaylist = defineStore('playlist', {
currentClipIn: 0,
currentClipOut: 0,
ingestRuns: false,
- playedSec: 0,
+ elapsedSec: 0,
+ shift: 0,
playoutIsRunning: false,
}),
@@ -81,10 +82,11 @@ export const usePlaylist = defineStore('playlist', {
this.currentClipOut = item.media.out
this.currentClipDuration = item.media.duration
this.currentClipIndex = item.index
- this.playedSec = item.played
+ this.elapsedSec = item.elapsed
this.ingestRuns = item.ingest
+ this.shift = item.shift
- this.progressValue = (this.playedSec * 100) / this.currentClipOut
+ this.progressValue = (this.elapsedSec * 100) / this.currentClipOut
},
},
})
diff --git a/types/index.d.ts b/types/index.d.ts
index f3adaecb..ecf86473 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -125,6 +125,7 @@ declare global {
index: number
ingest: boolean
mode: string
- played: number
+ elapsed: number
+ shift: number
}
}