fix player status, scroll to current item on start
This commit is contained in:
parent
5601698f91
commit
e4baf19000
@ -271,6 +271,7 @@ watch([data], () => {
|
|||||||
playlistStore.setStatus(playout_status)
|
playlistStore.setStatus(playout_status)
|
||||||
} catch {
|
} catch {
|
||||||
indexStore.sseConnected = true
|
indexStore.sseConnected = true
|
||||||
|
playlistStore.playoutIsRunning = false
|
||||||
resetStatus()
|
resetStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ const playlistContainer = ref()
|
|||||||
const sortContainer = ref()
|
const sortContainer = ref()
|
||||||
const todayDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD'))
|
const todayDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD'))
|
||||||
const { id } = storeToRefs(useConfig())
|
const { id } = storeToRefs(useConfig())
|
||||||
const { currentIndex, listDate } = storeToRefs(usePlaylist())
|
const { currentIndex, listDate, playoutIsRunning } = storeToRefs(usePlaylist())
|
||||||
|
|
||||||
const playlistSortOptions = {
|
const playlistSortOptions = {
|
||||||
group: 'playlist',
|
group: 'playlist',
|
||||||
@ -175,6 +175,12 @@ watch([listDate, id], () => {
|
|||||||
}, 800)
|
}, 800)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch([playoutIsRunning], () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
scrollTo(currentIndex.value)
|
||||||
|
}, 400)
|
||||||
|
})
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
classSwitcher,
|
classSwitcher,
|
||||||
getPlaylist,
|
getPlaylist,
|
||||||
|
Loading…
Reference in New Issue
Block a user