mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-21 10:21:57 +00:00
feat: seek duration
This commit is contained in:
parent
3eb349c31e
commit
246e713c6e
3 changed files with 18 additions and 7 deletions
|
|
@ -156,7 +156,8 @@ export const defaults = {
|
||||||
extensions: SUPPORTS.extensions ? ['@thaunknown/ani-resourced'] : [],
|
extensions: SUPPORTS.extensions ? ['@thaunknown/ani-resourced'] : [],
|
||||||
sources: {},
|
sources: {},
|
||||||
enableExternal: false,
|
enableExternal: false,
|
||||||
playerPath: ''
|
playerPath: '',
|
||||||
|
playerSeek: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export const subtitleExtensions = ['srt', 'vtt', 'ass', 'ssa', 'sub', 'txt']
|
export const subtitleExtensions = ['srt', 'vtt', 'ass', 'ssa', 'sub', 'txt']
|
||||||
|
|
|
||||||
|
|
@ -347,10 +347,10 @@
|
||||||
video.currentTime = targetTime
|
video.currentTime = targetTime
|
||||||
}
|
}
|
||||||
function forward () {
|
function forward () {
|
||||||
seek(2)
|
seek(settings.value.playerSeek)
|
||||||
}
|
}
|
||||||
function rewind () {
|
function rewind () {
|
||||||
seek(-2)
|
seek(-settings.value.playerSeek)
|
||||||
}
|
}
|
||||||
function selectAudio (id) {
|
function selectAudio (id) {
|
||||||
if (id !== undefined) {
|
if (id !== undefined) {
|
||||||
|
|
@ -553,8 +553,9 @@
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
rewind()
|
rewind()
|
||||||
},
|
},
|
||||||
id: '-2',
|
id: 'fast_rewind',
|
||||||
desc: 'Rewind 2s'
|
type: 'icon',
|
||||||
|
desc: 'Rewind'
|
||||||
},
|
},
|
||||||
ArrowRight: {
|
ArrowRight: {
|
||||||
fn: e => {
|
fn: e => {
|
||||||
|
|
@ -562,8 +563,9 @@
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
forward()
|
forward()
|
||||||
},
|
},
|
||||||
id: '+2',
|
id: 'fast_forward',
|
||||||
desc: 'Seek 2s'
|
type: 'icon',
|
||||||
|
desc: 'Seek'
|
||||||
},
|
},
|
||||||
ArrowUp: {
|
ArrowUp: {
|
||||||
fn: e => {
|
fn: e => {
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,14 @@
|
||||||
<label for='player-deband'>{settings.playerDeband ? 'On' : 'Off'}</label>
|
<label for='player-deband'>{settings.playerDeband ? 'On' : 'Off'}</label>
|
||||||
</div>
|
</div>
|
||||||
</SettingCard>
|
</SettingCard>
|
||||||
|
<SettingCard title='Seek Duration' description='Seconds to skip forward or backward when using the seek buttons or keyboard shortcuts. Higher values might negatively impact buffering speeds.'>
|
||||||
|
<div class='input-group w-100 mw-full'>
|
||||||
|
<input type='number' inputmode='numeric' pattern={'[0-9]*'} bind:value={settings.playerSeek} min='1' max='50' class='form-control text-right bg-dark' />
|
||||||
|
<div class='input-group-append'>
|
||||||
|
<span class='input-group-text bg-dark'>sec</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</SettingCard>
|
||||||
|
|
||||||
{#if SUPPORTS.externalPlayer}
|
{#if SUPPORTS.externalPlayer}
|
||||||
<h4 class='mb-10 font-weight-bold'>External Player Settings</h4>
|
<h4 class='mb-10 font-weight-bold'>External Player Settings</h4>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue