A recently merged PR https://github.com/mpv-player/mpv/pull/11226 made
the console use the new user-data property instead of
shared-script-properties, resulting in our margins being ignored.
This sets the `user-data/osc/margins` property in addition to the old
shared-script-property to keep compatiblity with older mpv versions.
* fix: constant width for hovered time
* fix: respect the trimmed time width in the buffered time indicator
* perf: cache timestamp substitutes for width calculation
Co-authored-by: tomasklaen <tomas.klaen@gmail.com>
---------
Co-authored-by: tomasklaen <tomas.klaen@gmail.com>
Added option `top_bar_alt_title`, which accepts an alternative title template to be displayed, and `top_bar_alt_title_place` that controls where it should be displayed. It can be either `below` to place it below the main one, or `toggle` to show it in place of the main title when user clicks the top bar or calls the `toggle-title` binding.
The `top_bar_title` now also accepts a custom top bar title template if user wants it to be different from the one defined in `mpv.conf`.
closes#402
This allows 3rd party scripts to replace the handling of built in uosc key bindings with their own logic.
Example that replaces uosc's basic stream quality menu with christoph-heinrich/mpv-quality-menu:
```lua
mp.commandv('script-message-to', 'uosc', 'overwrite-binding', 'stream-quality', 'script-binding quality_menu/video_formats_toggle')
```
`mouse-pos.hover` may or may not be false during touch input
(contrary to mouse input, where false means the cursor left the window)
Detecting a change to false as a leave event, while allowing any
other mouse-pos update to cause an enter event solves this.
`destination_time` accepts one of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file).
`total_time` is deprecated, but still works as expected.
* fix: only update resolution when it's > 0
* fix: only render after the resolution has been initialized
* chore: update type annotation to fix warning
I don't like this solution, but anything cleaner would probably require converting chapter indicators into individual elements and than managing/updating their positions and sizes in relation to growing timeline, which seems like a lot more work and code, so this'll have to suffice.
closes#370
- Preselecting previous folder wasn't working sometimes.
- `join_path()` didn't account for drive letters already having a separator.
Also refactors how `open_file_navigation_menu()` stores menu items value. As a side effect this is now a lot faster as we don't have to serialize each item's path into meta table, but instead we now store just a path string and handle it as needed.
closes#355