mirror of
https://github.com/NoCrypt/migu.git
synced 2026-01-11 20:10:22 +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'] : [],
|
||||
sources: {},
|
||||
enableExternal: false,
|
||||
playerPath: ''
|
||||
playerPath: '',
|
||||
playerSeek: 2
|
||||
}
|
||||
|
||||
export const subtitleExtensions = ['srt', 'vtt', 'ass', 'ssa', 'sub', 'txt']
|
||||
|
|
|
|||
|
|
@ -347,10 +347,10 @@
|
|||
video.currentTime = targetTime
|
||||
}
|
||||
function forward () {
|
||||
seek(2)
|
||||
seek(settings.value.playerSeek)
|
||||
}
|
||||
function rewind () {
|
||||
seek(-2)
|
||||
seek(-settings.value.playerSeek)
|
||||
}
|
||||
function selectAudio (id) {
|
||||
if (id !== undefined) {
|
||||
|
|
@ -553,8 +553,9 @@
|
|||
e.preventDefault()
|
||||
rewind()
|
||||
},
|
||||
id: '-2',
|
||||
desc: 'Rewind 2s'
|
||||
id: 'fast_rewind',
|
||||
type: 'icon',
|
||||
desc: 'Rewind'
|
||||
},
|
||||
ArrowRight: {
|
||||
fn: e => {
|
||||
|
|
@ -562,8 +563,9 @@
|
|||
e.preventDefault()
|
||||
forward()
|
||||
},
|
||||
id: '+2',
|
||||
desc: 'Seek 2s'
|
||||
id: 'fast_forward',
|
||||
type: 'icon',
|
||||
desc: 'Seek'
|
||||
},
|
||||
ArrowUp: {
|
||||
fn: e => {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,14 @@
|
|||
<label for='player-deband'>{settings.playerDeband ? 'On' : 'Off'}</label>
|
||||
</div>
|
||||
</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}
|
||||
<h4 class='mb-10 font-weight-bold'>External Player Settings</h4>
|
||||
|
|
|
|||
Loading…
Reference in a new issue