Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
shinosaki authored Oct 14, 2024
1 parent 7f12b0b commit f324c8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
video.src = url
} else {
let comments
const delay = 500
const delaySec = 5

if (file.type === 'application/json') {
const json = await fetch(url).then(r => r.json())
comments = json.filter(v => v.chat)
.map(({ chat }) => ({
text: chat.content,
time: (chat.vpos ?? chat['@vpos'] / 100) - delay
time: (chat.vpos ?? chat['@vpos'] / 100) + delaySec
}))
}
if (file.type.endsWith('xml')) {
Expand All @@ -92,7 +92,7 @@
})
.map(({ chat }) => ({
text: chat.content,
time: (chat.vpos ?? chat['@vpos'] / 100) - delay
time: (chat.vpos ?? chat['@vpos'] / 100) + delaySec
}))
}

Expand Down

0 comments on commit f324c8e

Please sign in to comment.