mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-19 23:52:06 +00:00
fix: subtitle fonts being incorrectly encoded
fix: touch seeking controlls issues
This commit is contained in:
parent
ccb05122ec
commit
ba34c0d12a
3 changed files with 7 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import Metadata from 'matroska-metadata'
|
||||
import { arr2text } from 'uint8-util'
|
||||
import { arr2hex, hex2bin } from 'uint8-util'
|
||||
import { fontRx } from './util.js'
|
||||
import { SUPPORTS } from '@/modules/support.js'
|
||||
|
||||
|
|
@ -35,10 +35,10 @@ export default class Parser {
|
|||
for (const file of files) {
|
||||
if (fontRx.test(file.filename) || file.mimetype?.toLowerCase().includes('font')) {
|
||||
// this is cursed, but required, as capacitor-node's IPC hangs for 2mins when runnig on 32bit android when sending uint8's
|
||||
const data = arr2text(file.data)
|
||||
const data = hex2bin(arr2hex(file.data))
|
||||
// IPC crashes if the message is >16MB, wild
|
||||
if (SUPPORTS.isAndroid && data.length > 15_000_000) continue
|
||||
this.client.dispatch('file', { data })
|
||||
this.client.dispatch('file', data)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import JASSUB from 'jassub'
|
||||
import { text2arr } from 'uint8-util'
|
||||
import { hex2arr, bin2hex } from 'uint8-util'
|
||||
import { toTS, subRx, videoRx } from './util.js'
|
||||
import { settings } from '@/modules/settings.js'
|
||||
import { client } from '@/modules/torrent.js'
|
||||
|
|
@ -42,7 +42,7 @@ export default class Subtitles {
|
|||
this.timeout = null
|
||||
this.handleFile = ({ detail }) => {
|
||||
if (this.selected) {
|
||||
const uint8 = text2arr(detail.data)
|
||||
const uint8 = hex2arr(bin2hex(detail))
|
||||
this.fonts.push(uint8)
|
||||
this.renderer?.addFont(uint8)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1114,7 +1114,7 @@
|
|||
<span class='material-symbols-outlined ctrl h-full align-items-center w-150 mw-full ml-auto' use:click={forward}> fast_forward </span>
|
||||
<div class='position-absolute bufferingDisplay' />
|
||||
{#if currentSkippable}
|
||||
<button class='skip btn text-dark position-absolute bottom-0 right-0 mr-20 mb-5 font-weight-bold' use:click={skip}>
|
||||
<button class='skip btn text-dark position-absolute bottom-0 right-0 mr-20 mb-5 font-weight-bold z-30' use:click={skip}>
|
||||
Skip {currentSkippable}
|
||||
</button>
|
||||
{/if}
|
||||
|
|
@ -1434,7 +1434,6 @@
|
|||
|
||||
.middle .ctrl {
|
||||
font-size: 4rem;
|
||||
margin: 2rem;
|
||||
z-index: 3;
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1453,10 +1452,9 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.miniplayer .middle .ctrl {
|
||||
.miniplayer .middle .ctrl[data-name='playPause'] {
|
||||
display: flex;
|
||||
font-size: 2.8rem;
|
||||
margin: 0.6rem;
|
||||
}
|
||||
.miniplayer .middle .ctrl[data-name='playPause'] {
|
||||
font-size: 5.625rem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue