last sound logs + assets

This commit is contained in:
bkfox
2022-05-21 19:11:56 +02:00
parent 59d5a1c3dc
commit a87b9c7e72
3 changed files with 35 additions and 23 deletions

View File

@ -37,7 +37,8 @@ export default class Live {
this.items = data
const now = new Date()
const item = data.find(it => it.start && (it.start <= now < it.end))
let item = data.find(it => it.start && (it.start <= now < it.end)) ||
data.length ? data[data.length-1] : null;
if(item) {
item.src = this.src
this.current = new Model(item)