Commit Graph

700 Commits

Author SHA1 Message Date
tomasklaen
50c9629538 refactor: removed unused function param 2023-04-07 09:01:56 +02:00
tomasklaen
ebe512a69d fix: delayed seeking timer initialization placed in the wrong function 2023-04-07 08:57:46 +02:00
tomasklaen
fac2370208 fix: more timeline seeking, dragging, and autohide related tweaks and fixes
Includes how mouse events are dispatched which now handles deduplication and ensures `down` event won't fine `move` as well, which was causing exact and slow seeks in quick succession when clicking on timeline without moving the mouse, causing glitchy looking seeking.

ref #496
2023-04-06 10:47:09 +02:00
tomasklaen
8d85068b7c fix: cursor events not refreshing autohide timer
ref #496
2023-04-05 17:10:37 +02:00
tomasklaen
808fa59418 fix: autohide un-registering cursor events when menu is open
closes #495
2023-04-03 21:53:30 +02:00
christoph-heinrich
5fbfac3eca
fix: only enable/disable mouse keybinds when they change (#492)
The keybindings 'mbtn_left' and 'wheel' were enabled/disabled on every
render, resulting in log files being spammed with corresponding debug
messages.
To avoid that only call the enable/disable function when the current
decision is different to the last one.
2023-04-02 09:05:21 +02:00
tomasklaen
19f421f67c fix: premature thumbnail hiding during drag seeking 2023-03-29 23:13:51 +02:00
tomasklaen
21b37ce33b fix: submenus vertically misaligned when opened via show-submenu message
closes #459
2023-03-29 17:08:53 +02:00
tomasklaen
bcb3c811ca fix: image disposition returning false positives
closes #458
2023-03-29 11:09:00 +02:00
tomasklaen
08734f1dda refactor: use mpv's new platform prop to detect platform
closes #462
2023-03-29 10:41:12 +02:00
tomasklaen
00daff7ca2 fix: hide thumbnail when dragging timeline
ref #358
2023-03-29 10:04:28 +02:00
tomasklaen
984f8aa2c8 feat: clicking on playlist indicator in top bar now opens playlist menu
closes #480, closes #481
2023-03-29 09:44:59 +02:00
christoph-heinrich
4dd9bf8a71
tweak: add padding to title (#484)
Long titles with short items would lead to the title touching the edge
of the menu, which doesn't look good. Adding padding like is already
with the items remedies this.
2023-03-29 09:13:35 +02:00
Tomas Klaen
f635df18f7
refactor: cursor events consolidated into one interface (#483)
`mbtn_left` and `wheel` events are now only fired on a `cursor.on_{event}` object, which resets at the beginning of each frame, so elements need to bind these listeners in their render functions. These properties are overwritable which allows elements to take over cursor event handling from their parents if necessary.
2023-03-29 09:08:18 +02:00
tomasklaen
9839e7b726 fix: elements staying visible after switching to fullscreen
closes #482
2023-03-27 16:54:38 +02:00
tomasklaen
02228282be refactor: uppercase constants 2023-03-27 16:52:32 +02:00
xfzv
1ed8a7a823
fix: add ac3 to audio types (#468) 2023-03-04 16:20:51 +01:00
christoph-heinrich
cb14638ae0
fix: use the new console margins API
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.
2023-02-27 09:45:30 +01:00
tomasklaen
f039af5732 feat: added menu keybinds to move and delete items in playlists
`ctrl+up/down` moves a selected item up/down, and `del` deletes it.
2023-02-20 16:12:22 +01:00
tomasklaen
2e5b0cc834 fix: title deduplication matching not escaping pattern parameter
ref #455
2023-02-18 10:58:09 +01:00
tomasklaen
0bc28c213c feat: smarter window main & alt titles deduplication
Deduplicates the main and alt titles by checking if one completely contains the other, and using only the longer one.

ref #455
2023-02-18 10:19:48 +01:00
christoph-heinrich
1dfbbd7091
fix: lax chapter range patterns producing false positives (#454) 2023-02-16 20:26:06 +01:00
tomasklaen
94ec120923 4.6.0 2023-02-15 09:59:39 +01:00
christoph-heinrich
30d6e12001
feat: add on_close command to menu API (#449) 2023-02-07 08:45:04 +01:00
tomasklaen
51015682f8 feat: visually distinct a-b loop indicators
closes #360
2023-01-31 11:11:49 +01:00
christoph-heinrich
811b2c5f33
fix: timestamp offsets should respect the trimmed time width (#443)
* 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>
2023-01-31 09:11:56 +01:00
tomasklaen
e3c06eb814 feat: made ctrl+click in file menus behave just like ctrl+enter does
ref #378
2023-01-30 22:18:16 +01:00
tomasklaen
75de632fbd fix: 54bb9d6 prevented loading audio/subtitle tracks from other video files
closes #442
2023-01-30 18:11:32 +01:00
tomasklaen
3b68314fcf fix: click to the left of file menus navigating up instead of closing the menu 2023-01-30 15:22:36 +01:00
tomasklaen
479816af52 fix: file menu back feature broken by b9cc1cc
ref #378
2023-01-30 15:02:48 +01:00
christoph-heinrich
fd54373be8
fix: infinite margin on initialization (#362) 2023-01-30 14:41:05 +01:00
tomasklaen
b9cc1ccc3c feat: ctrl+enter in file menus will load selected directory
closes #378
2023-01-30 14:05:26 +01:00
tomasklaen
543c4a71f1 feat: added autoload_types option
Controls what file types to look for when deciding next file to play.

Comma separated list of: `video`, `audio`, `image`, `subtitle`

closes #387
2023-01-30 12:57:05 +01:00
tomasklaen
54bb9d6a77 feat: split media_types option into video_types, audio_types, and image_types 2023-01-30 11:44:15 +01:00
tomasklaen
188a579ebf fix: menus not toggling off after being updated
closes #400
2023-01-30 11:09:44 +01:00
tomasklaen
7647cac9f8 feat: trim unnecessary 00: from timestamps in durations shorter than an hour
closes #401
2023-01-30 10:58:22 +01:00
tomasklaen
9ebc600d37 feat: added show-submenu-blurred message listener
closes #441
2023-01-30 10:14:39 +01:00
tomasklaen
b32ae2abaf fix: top_bar's visibility sometimes stuck when going fullscreen
closes #436
2023-01-21 22:14:00 +01:00
tomasklaen
32cc283397 feat: flash top bar when new file is loaded
closes #380
2023-01-18 12:15:14 +01:00
tomasklaen
8183163f2a feat: added options to display alternative top bar title
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
2023-01-18 12:06:10 +01:00
Tomas Klaen
c5ccd1b4ef
feat: added an API to overwrite uosc key bindings (#430)
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')
```
2023-01-18 09:48:31 +01:00
Till
ed58830ca7
docs: minor additions and cleanup (#428) 2023-01-14 11:34:56 +01:00
christoph-heinrich
e460e8c973
feat: better alphanumerical sorting (#426) 2023-01-13 19:41:17 +01:00
christoph-heinrich
68ac697002
fix: buffered time respects minus in time remaining (#424) 2023-01-10 21:15:47 +01:00
christoph-heinrich
2b887fcd76
tweak: buffered time threshold based on displayed value (#423) 2023-01-10 21:14:07 +01:00
tomasklaen
9f9b8e422e fix: buffered time not accounting for speed
closes #421
2023-01-10 09:07:57 +01:00
christoph-heinrich
11f9067182
fix: mouse-pos can be nil (#418) 2023-01-05 15:57:30 +01:00
christoph-heinrich
5a02c6d205
fix: touch input (#412)
`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.
2023-01-02 08:51:49 +01:00
Michael
e66c8fbf88
feat: added destination_time option and deprecated total_time (#399)
`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.
2022-12-27 09:17:12 +01:00
xfzv
ea371b5740
fix: add dts to media_types (#398) 2022-12-24 10:41:45 +01:00