Region-based Looping (a.k.a. A/B looping) utilizing videojs-abloop plugin (#3904)

* yarn add videojs-abloop
* add abLoop plugin to video player
* adding player keyboard shortcut 'l' for toggling a/b looping

copies mpv behavior:
if a/b loop start not yet set, sets start to current player time
elif a/b loop stop not yet set, sets end to current player time and enables loop
else, disables a/b loop

relates to #3264 (https://github.com/stashapp/stash/issues/3264)

* update help with keyboard shortcut
* Add plugin type definitions
* Make UI elements optional
---------
Co-authored-by: chickenwingavalanche <chickenwingavalanche@example.com>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
chickenwingavalanche
2023-08-23 20:58:47 -06:00
committed by GitHub
parent 922aef3e5a
commit 1f3ed07188
8 changed files with 88 additions and 2 deletions

View File

@@ -364,6 +364,13 @@ export const SettingsInterfacePanel: React.FC = () => {
return <span>{DurationUtils.secondsToString(v ?? 0)}</span>;
}}
/>
<BooleanSetting
id="show-ab-loop"
headingID="config.ui.scene_player.options.show_ab_loop_controls"
checked={ui.showAbLoopControls ?? undefined}
onChange={(v) => saveUI({ showAbLoopControls: v })}
/>
</SettingSection>
<SettingSection headingID="config.ui.tag_panel.heading">
<BooleanSetting