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)
|
||||
} catch {
|
||||
indexStore.sseConnected = true
|
||||
playlistStore.playoutIsRunning = false
|
||||
resetStatus()
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ const playlistContainer = ref()
|
||||
const sortContainer = ref()
|
||||
const todayDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD'))
|
||||
const { id } = storeToRefs(useConfig())
|
||||
const { currentIndex, listDate } = storeToRefs(usePlaylist())
|
||||
const { currentIndex, listDate, playoutIsRunning } = storeToRefs(usePlaylist())
|
||||
|
||||
const playlistSortOptions = {
|
||||
group: 'playlist',
|
||||
@ -175,6 +175,12 @@ watch([listDate, id], () => {
|
||||
}, 800)
|
||||
})
|
||||
|
||||
watch([playoutIsRunning], () => {
|
||||
setTimeout(() => {
|
||||
scrollTo(currentIndex.value)
|
||||
}, 400)
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
classSwitcher,
|
||||
getPlaylist,
|
||||
|
Loading…
Reference in New Issue
Block a user