mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-18 14:42:05 +00:00
fix: bugged subtitle styles
This commit is contained in:
parent
87c639d204
commit
3f2bc3e6b4
2 changed files with 3 additions and 4 deletions
|
|
@ -137,12 +137,12 @@
|
|||
chapters = []
|
||||
currentSkippable = null
|
||||
completed = false
|
||||
if (subs) subs.destroy()
|
||||
current = file
|
||||
emit('current', current)
|
||||
if (subs) subs.destroy()
|
||||
subs = new Subtitles(video, files, current, handleHeaders)
|
||||
src = file.url
|
||||
client.send('current', file)
|
||||
subs = new Subtitles(video, files, current, handleHeaders)
|
||||
await tick()
|
||||
video?.play()
|
||||
}
|
||||
|
|
@ -892,7 +892,6 @@
|
|||
on:loadedmetadata={findChapters}
|
||||
on:loadedmetadata={autoPlay}
|
||||
on:loadedmetadata={checkAudio}
|
||||
on:loadedmetadata={() => subs?.initSubtitleRenderer()}
|
||||
on:leavepictureinpicture={() => (pip = false)} />
|
||||
{#if stats}
|
||||
<div class='position-absolute top-0 bg-tp p-10 m-15 text-monospace rounded z-50'>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ export default class Subtitles {
|
|||
this.onHeader()
|
||||
}
|
||||
}
|
||||
this.initSubtitleRenderer()
|
||||
const tracks = this.headers?.filter(t => t)
|
||||
if (tracks?.length && set.subtitleLanguage) {
|
||||
if (tracks.length === 1) {
|
||||
|
|
@ -169,7 +170,6 @@ export default class Subtitles {
|
|||
this.fonts.push(new Uint8Array(set.font.data))
|
||||
}
|
||||
this.renderer = new JASSUB(options)
|
||||
this.selectCaptions(this.current)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue