fix: hanging when playing video on smart TV's

This commit is contained in:
ThaUnknown 2023-12-26 02:40:22 +01:00
parent e3c64e1ead
commit 9cbdfd876b
3 changed files with 6 additions and 3 deletions

View file

@ -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]) })
} }
} }
}) })

View file

@ -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)
} }

View file

@ -1433,6 +1433,9 @@
.toggle-fullscreen { .toggle-fullscreen {
display: none !important; display: none !important;
} }
.volume {
display: none;
}
} }
</style> </style>