From 9cbdfd876b2b4c0d4ab4bc259da350d97ced5673 Mon Sep 17 00:00:00 2001 From: ThaUnknown <6506529+ThaUnknown@users.noreply.github.com> Date: Tue, 26 Dec 2023 02:40:22 +0100 Subject: [PATCH] fix: hanging when playing video on smart TV's --- common/modules/parser.js | 4 ++-- common/modules/subtitles.js | 2 +- common/views/Player/Player.svelte | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/modules/parser.js b/common/modules/parser.js index 4045342..53f932e 100644 --- a/common/modules/parser.js +++ b/common/modules/parser.js @@ -32,8 +32,8 @@ export default class Parser { if (this.destroyed) return for (const file of files) { if (fontRx.test(file.filename) || file.mimetype.toLowerCase().includes('font')) { - const data = new Uint8Array(file.data) - this.client.dispatch('file', { data }, [data.buffer]) + // 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: JSON.stringify([...file.data]) }) } } }) diff --git a/common/modules/subtitles.js b/common/modules/subtitles.js index 59046f2..52ee919 100644 --- a/common/modules/subtitles.js +++ b/common/modules/subtitles.js @@ -41,7 +41,7 @@ export default class Subtitles { this.timeout = null this.handleFile = ({ detail }) => { if (this.selected) { - const uint8 = new Uint8Array(detail.data) + const uint8 = new Uint8Array(JSON.parse(detail.data)) this.fonts.push(uint8) this.renderer?.addFont(uint8) } diff --git a/common/views/Player/Player.svelte b/common/views/Player/Player.svelte index 6498931..0399508 100644 --- a/common/views/Player/Player.svelte +++ b/common/views/Player/Player.svelte @@ -1433,6 +1433,9 @@ .toggle-fullscreen { display: none !important; } + .volume { + display: none; + } }