mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 22:22:04 +00:00
fix: hanging when playing video on smart TV's
This commit is contained in:
parent
e3c64e1ead
commit
9cbdfd876b
3 changed files with 6 additions and 3 deletions
|
|
@ -32,8 +32,8 @@ export default class Parser {
|
||||||
if (this.destroyed) return
|
if (this.destroyed) return
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
if (fontRx.test(file.filename) || file.mimetype.toLowerCase().includes('font')) {
|
if (fontRx.test(file.filename) || file.mimetype.toLowerCase().includes('font')) {
|
||||||
const data = new Uint8Array(file.data)
|
// this is cursed, but required, as capacitor-node's IPC hangs for 2mins when runnig on 32bit android when sending uint8's
|
||||||
this.client.dispatch('file', { data }, [data.buffer])
|
this.client.dispatch('file', { data: JSON.stringify([...file.data]) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export default class Subtitles {
|
||||||
this.timeout = null
|
this.timeout = null
|
||||||
this.handleFile = ({ detail }) => {
|
this.handleFile = ({ detail }) => {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
const uint8 = new Uint8Array(detail.data)
|
const uint8 = new Uint8Array(JSON.parse(detail.data))
|
||||||
this.fonts.push(uint8)
|
this.fonts.push(uint8)
|
||||||
this.renderer?.addFont(uint8)
|
this.renderer?.addFont(uint8)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1433,6 +1433,9 @@
|
||||||
.toggle-fullscreen {
|
.toggle-fullscreen {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
.volume {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue