mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-21 00:22:08 +00:00
feat: custom seek duration
This commit is contained in:
parent
da73f82b95
commit
aa3fcdf52c
3 changed files with 21 additions and 8 deletions
|
|
@ -126,6 +126,7 @@ export const defaults = {
|
||||||
playerPause: true,
|
playerPause: true,
|
||||||
playerAutocomplete: true,
|
playerAutocomplete: true,
|
||||||
playerDeband: false,
|
playerDeband: false,
|
||||||
|
playerSeek: 2,
|
||||||
rssQuality: '1080',
|
rssQuality: '1080',
|
||||||
rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'ASW [Small Size]']] : [],
|
rssFeedsNew: SUPPORTS.extensions ? [['New Releases', 'ASW [Small Size]']] : [],
|
||||||
rssAutoplay: false,
|
rssAutoplay: false,
|
||||||
|
|
|
||||||
|
|
@ -351,10 +351,10 @@
|
||||||
video.currentTime = targetTime
|
video.currentTime = targetTime
|
||||||
}
|
}
|
||||||
function forward () {
|
function forward () {
|
||||||
seek(2)
|
seek($settings.playerSeek)
|
||||||
}
|
}
|
||||||
function rewind () {
|
function rewind () {
|
||||||
seek(-2)
|
seek(-$settings.playerSeek)
|
||||||
}
|
}
|
||||||
function selectAudio (id) {
|
function selectAudio (id) {
|
||||||
if (id !== undefined) {
|
if (id !== undefined) {
|
||||||
|
|
@ -465,7 +465,7 @@
|
||||||
}
|
}
|
||||||
let fitWidth = false
|
let fitWidth = false
|
||||||
let showKeybinds = false
|
let showKeybinds = false
|
||||||
loadWithDefaults({
|
const ld = () => loadWithDefaults({
|
||||||
KeyX: {
|
KeyX: {
|
||||||
fn: () => screenshot(),
|
fn: () => screenshot(),
|
||||||
id: 'screenshot_monitor',
|
id: 'screenshot_monitor',
|
||||||
|
|
@ -479,7 +479,10 @@
|
||||||
desc: 'Toggle Stats'
|
desc: 'Toggle Stats'
|
||||||
},
|
},
|
||||||
Backquote: {
|
Backquote: {
|
||||||
fn: () => (showKeybinds = !showKeybinds),
|
fn: () => {
|
||||||
|
ld();
|
||||||
|
(showKeybinds = !showKeybinds);
|
||||||
|
},
|
||||||
id: 'help_outline',
|
id: 'help_outline',
|
||||||
type: 'icon',
|
type: 'icon',
|
||||||
desc: 'Toggle Keybinds'
|
desc: 'Toggle Keybinds'
|
||||||
|
|
@ -557,8 +560,8 @@
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
rewind()
|
rewind()
|
||||||
},
|
},
|
||||||
id: '-2',
|
id: `-${$settings.playerSeek}`,
|
||||||
desc: 'Rewind 2s'
|
desc: `Rewind ${$settings.playerSeek}s`
|
||||||
},
|
},
|
||||||
ArrowRight: {
|
ArrowRight: {
|
||||||
fn: e => {
|
fn: e => {
|
||||||
|
|
@ -566,8 +569,8 @@
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
forward()
|
forward()
|
||||||
},
|
},
|
||||||
id: '+2',
|
id: `+${$settings.playerSeek}`,
|
||||||
desc: 'Seek 2s'
|
desc: `Seek ${$settings.playerSeek}s`
|
||||||
},
|
},
|
||||||
ArrowUp: {
|
ArrowUp: {
|
||||||
fn: e => {
|
fn: e => {
|
||||||
|
|
@ -630,6 +633,7 @@
|
||||||
container.append(canvas)
|
container.append(canvas)
|
||||||
return { stream: canvas.captureStream(), destroy }
|
return { stream: canvas.captureStream(), destroy }
|
||||||
}
|
}
|
||||||
|
ld()
|
||||||
|
|
||||||
// function initCast (event) {
|
// function initCast (event) {
|
||||||
// // these quality settings are likely to make cast overheat, oh noes!
|
// // these quality settings are likely to make cast overheat, oh noes!
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,14 @@
|
||||||
<label for='player-autocomplete'>{settings.playerAutocomplete ? 'On' : 'Off'}</label>
|
<label for='player-autocomplete'>{settings.playerAutocomplete ? 'On' : 'Off'}</label>
|
||||||
</div>
|
</div>
|
||||||
</SettingCard>
|
</SettingCard>
|
||||||
|
<SettingCard title='Seek Duration' description='Seconds to seek an episode with arrow keys'>
|
||||||
|
<div class='input-group w-100 mw-full'>
|
||||||
|
<input type='number' 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'>s</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</SettingCard>
|
||||||
<SettingCard title='Deband Video' description='Reduces banding on dark and compressed videos. High performance impact, not recommended for high quality videos.'>
|
<SettingCard title='Deband Video' description='Reduces banding on dark and compressed videos. High performance impact, not recommended for high quality videos.'>
|
||||||
<div class='custom-switch'>
|
<div class='custom-switch'>
|
||||||
<input type='checkbox' id='player-deband' bind:checked={settings.playerDeband} />
|
<input type='checkbox' id='player-deband' bind:checked={settings.playerDeband} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue