Commit Graph

55 Commits

Author SHA1 Message Date
tomasklaen
75ab13f2e3 feat: make toggle and cycle controls work with external properties
ref #310
2022-10-10 09:56:16 +02:00
tomasklaen
993cfa5d21 tweak: click_threshold descrition and top bar subtitle offset 2022-10-10 09:02:57 +02:00
christoph-heinrich
d3f25af012 fix: options.click_threshold (#309) 2022-10-10 08:56:52 +02:00
tomasklaen
46ab864adc docs: clarify shuffle control and option descriptions
ref #310
2022-10-09 12:07:11 +02:00
tomasklaen
e94f9bf290 feat: implement click_threshold and click_command options
Deprecates `pause_on_click_shorter_than`.
2022-10-08 09:04:54 +02:00
christoph-heinrich
93bb49edce feat: automatically choose between fast and exact seeking (#302) 2022-10-07 23:04:51 +02:00
tomasklaen
983c389a4f feat: add timeline_drag_seek_keyframes option
Makes dragging in timeline use faster seeking to keyframes. Disabled by default.
2022-10-06 22:40:01 +02:00
tomasklaen
87a66b7378 revert: restore *_text color options
I've changed my mind :x Seen a screenshot with a valid use case for tweaking these.
2022-10-06 11:18:33 +02:00
tomasklaen
f9981ce58f feat: replace *_text color options with contrasting color detection
ref #294
2022-10-05 10:22:26 +02:00
dyphire
b194618e98 feat: add editions menu,editions control and has_many_editon disposition (#277) 2022-09-30 10:22:36 +02:00
hooke007
69eef3432f feat: show vids icon if the current file contains multi vid-tracks (#273) 2022-09-28 08:46:52 +02:00
hooke007
d304022c9e feat: make *_persistency support idle (#274) 2022-09-28 08:46:19 +02:00
dyphire
b8a37ef576 feat: add is_idle disposition (#271) 2022-09-27 20:21:47 +02:00
hooke007
bb0d1ace0d fix: a couple config defaults not matching script defaults (#265) 2022-09-25 09:54:25 +02:00
tomasklaen
f27e17e7dc feat!: removed wasd and hjkl menu navigation 2022-09-24 01:16:06 +02:00
tomasklaen
6ef4a2a53a tweak: colors 2022-09-23 16:58:24 +02:00
tomasklaen
810616a131 feat: implement chapter_range_patterns option
Effectively facilitates localization of simple chapter ranges.

ref #247
2022-09-23 16:15:11 +02:00
tomasklaen
850563dbef feat: implemented buffered_time_threshold option 2022-09-23 14:45:31 +02:00
dyphire
9bc72328f0 fix: improve formats in media types (#249) 2022-09-23 14:15:17 +02:00
tomasklaen
eca7836889 feat: split intros & outros into their own chapter range types
ref #163
2022-09-23 12:34:33 +02:00
tomasklaen
de41a10c07 feat: implemented menu-blurred command
Opens a menu without preselecting any item. Suitable when opening menu with a mouse input.

closes #248
2022-09-23 12:28:05 +02:00
tomasklaen
612e2a5cc4 refactor: renamed next_file_on_end to autoload 2022-09-23 11:59:00 +02:00
tomasklaen
3226a0d33e fix: improve file-end event detection
closes #235
2022-09-23 11:51:49 +02:00
tomasklaen
e05c6b6749 feat: removed directory_navigation_loops option in favor of loop-playlist
This is behavior is now controlled by mpv's `loop-playlist` property.
2022-09-23 09:32:06 +02:00
tomasklaen
d2dd7e4415 feat: implemented shuffle and next_file_on_end options
The `shuffle` option built into mpv doesn't shuffle playlist playback, but instead just randomizes the order of every new opened playlist. So when you enable this after opening a playlist, it does nothing. If you enable it before opening a playlist, it'll randomize its list order, so you can't browse alphabetically. None wants this, none expects this. And since its is expected from a ui such as uosc to provide a shuffle button that works like in any other media player on the planet, I had to simulate it.

It decides on the next file 300ms before the end, so it can potentially cut out punchlines from short videos such as those from r/perfectlycutscreams. But this is necessary because a lot of files actually end like ~100ms or more before their duration, but on corrupted files or files where stream ended prematurely, this can happen way before that. If file is force ended by mpv before our timer kicks in, our simulated `file-end` event won't fire, and uosc is unable to take over to decide to play the next one.

I couldn't figure out a better way to implement this. There's no 'fil-reached-end' even in mpv. There are only 'im-unloading-the-file' events (`file-end`, `on_unload`, ... etc), which is useless here because it triggers even when user opens a different file during playback.

Implementing `shuffle` allowed for trivial `next_file_on_end`, so that got added as well. It load next file in directory when current file ends.

Directory navigation now also adheres to `shuffle` uosc option, and `playlist-loop`, `playlist-repeat`, & `loop-file` mpv options.

Additionally, the `<has_playlist>` disposition was removed from the `shuffle` and `loop-playlist` control bar buttons as they now affect directory navigation as well.

closes #235
2022-09-22 14:57:54 +02:00
tomasklaen
2adfc36c24 feat: add top_bar_title_opacity option
ref #237
2022-09-21 23:18:01 +02:00
tomasklaen
a4638fcdef feat!: improve chapter ranges serialization
Users can no longer create their own or edit existing chapter range serializers, but that was always very limited and prone to errors. Instead, all common use cases for chapter ranges: intros/openings, outros/endings, and sponsor blocks serializers are now internal.

Users can still disable and configure colors for each individual serializer by specifying a `{type}:{color}` pairs delimited by a comma on a `chapter_ranges` property. The color is now an RGB(A) HEX code.
2022-09-21 22:58:00 +02:00
tomasklaen
a03fe26f38 refactor: update default controls bar and its dispositions 2022-09-21 14:55:05 +02:00
tomasklaen
6d54e0fdfe fix: speed_opacity option being ignored
closes #231
2022-09-21 14:10:59 +02:00
tomasklaen
a4257d7c31 feat!: accept colors in RGB(A) HEX format
Affects options `foreground`, `foreground_text`, `background`, `background_text`.

Other configurable colors will follow suit in next commits.
2022-09-21 14:02:43 +02:00
dyphire
6ac00f9115 fix: add .vob and .lrc in *_types (#224) 2022-09-20 12:24:14 +02:00
hooke007
4dc4a8ee3d fix: add more formats in *_types (#220) 2022-09-19 23:43:45 +02:00
tomasklaen
ed8cb8741e feat: added has_many_* disposition types
Adds `has_many_audio`, `has_many_sub`, and `has_many_video` disposition types that can
be used when constructing the controls bar.

The audio track selector button now has a `<has_many_audio>` disposition instead of the old `<has_audio,!audio>`.
2022-09-19 23:42:32 +02:00
tomasklaen
5d92c73481 feat: added control bar button badge limits
It is now possible to specify a threshold when to hide the badge by doing `#audio>1` to display the audio counter badge only when there's more than 1 audio track.

ref #212
2022-09-19 22:08:13 +02:00
Zhong Lufan
3fcafbd64a fix: add .mka to media types (#219) 2022-09-19 21:15:16 +02:00
tomasklaen
fca0dff196 feat: improved top bar playlist position indicator
Also removes the counter from built-in playlist related control buttons, as big playlists create badges that are too big and overlap/overflow the button too much. And having the counter there will make people ask for position (understandable), which would further worsen this problem. Better to have it in the top bar.

ref #212
2022-09-19 17:18:13 +02:00
tomasklaen
c8f4f22d15 feat: added counters and other badges to control buttons
Implements control element `#{badge}` syntax. Example:

```
command:subtitles:script-binding uosc/subtitles#sub?Subtitles
```

ref #212
2022-09-19 14:47:14 +02:00
tomasklaen
e54744b475 refactor: assorted tweaks 2022-09-19 09:55:33 +02:00
tomasklaen
36dd0a622d feat!: convert timeline_chapters option into timeline_chapters_opacity
Controls opacity of chapter indicators with option to disable completely when set to `0`.

ref #206
2022-09-18 15:15:28 +02:00
tomasklaen
3c85721f1a feat!: improve chapters rendering style
All of the old styles had visibility issues, and rendering code was a bit too overcomplicated. This fixes all if it by rendering chapters as diamond indicators on top of the timeline.

`timeline_chapters` option is now a boolean, and `timeline_chapters_opacity` & `timeline_chapters_width` have been removed.

This means chapter rendering is no longer configurable, as they resize based on timeline size, and inherit its opacity and border size, so I don't see what anyone would want to configure here, but I'm sure I'll get some requests as always :'(.

ref #206
2022-09-18 14:26:01 +02:00
tomasklaen
63b7573bde refactor!: removed color_ prefixes from options 2022-09-18 00:21:36 +02:00
tomasklaen
c909409254 feat!: added textures to improve indicators and other visuals
Removes `timeline_cached_ranges` option.

closes #206
2022-09-18 00:11:21 +02:00
dyphire
32011e46d6 feat: add has_sub and has_chapter dispositions (#207) 2022-09-16 09:09:56 +02:00
tomasklaen
85b49002a8 feat: remove title option, use mpv's title config instead
ref #177
2022-09-14 16:45:57 +02:00
tomasklaen
fefe5f01d8 feat: added title option
ref #177
2022-09-14 16:29:10 +02:00
tomasklaen
b87a9a59f4 feat: added text_border option
Controls border of any text or icon when drawn on top of video.

ref #185
2022-09-14 14:14:45 +02:00
tomasklaen
1f18b8b751 feat: improve volume slider visuals
I wanted to round the nudge as well, but thats just too much math and bezier curves.
2022-09-14 13:53:30 +02:00
tomasklaen
ebccd11328 feat!: consolidate all *_font_scale options into one font_scale
ref #185
2022-09-13 17:55:31 +02:00
tomasklaen
9b64c529ac refactor!: element system, menu implementation, ...
With this, the codebase is mostly typed (as much as sumneko's type checking allows), and finally go-to-definition-able.

This refactor changed or touched more than 90% of the codebase, so here's just the most notable changes I can recall:

Menu implementation is now way more robust, and supports:
- live menu updates
- opening submenus allows navigating to parent menus
- items icons and bold & italic styling
- keeping menu open after selecting the item
- peeking submenus
- and a lot of other small tweaks

The menu input data structure changed. It no longer accepts `active_index` and `selected_index`, instead, each item can now have `active` or `selected` property.

And I'm sure there's a lot I'm forgetting to mention, but it's midnight here T.T

closes #144, ref #171, closes #176
2022-09-12 23:53:37 +02:00
tomasklaen
03abd30f8c feat: add tooltips 2022-09-07 14:09:00 +02:00