| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Pretty useless by now.
|
| |
|
| |
|
|
|
|
| |
This currently doesn't work properly on OSX due to some bugs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- --lua and --lua-opts change to --script and --script-opts
- 'lua' default script dirs change to 'scripts'
- DOCS updated
- 'lua-settings' dir was _not_ modified
The old lua-based names/dirs still work, but display a warning.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
| |
Meh.
|
| |
|
|
|
|
| |
source: http://spencermortensen.com/articles/bezier-circle/
|
|
|
|
|
|
|
|
|
| |
The flags weren't correctly set, and the mouse cursor remained visible
after leaving menu mode.
This was apparently broken in 0.7.0 too.
Fixes #1316.
|
|
|
|
|
|
|
| |
They interfere.
It turns out that commit b6ca4a48 actually broke this in weird ways, but
this solution is better anyway.
|
|
|
|
| |
This is basically cosmetic; it was leaking the old handler functions.
|
|
|
|
|
|
| |
So the OSC will still appear when using --no-input-default-bindings. It
also means it may override a user's mouse_move binding, but I guess
users who don't want the OSC should just use the --no-osc option.
|
|
|
|
|
|
|
|
| |
Yep, Lua is so crappy that the stdlib doesn't provide anything like
this.
Repurposes the undocumented mp.format_table() function and moves it to
mp.utils.
|
| |
|
|
|
|
|
|
|
|
| |
this currently uses a sketchy but apparently working workaround,
which will be removed once the neccessary changes in youtube-dl
are implemented
Fixes #1277
|
|
|
|
|
| |
prints the actual duration as reported by youtube-dl to the
terminal when available
|
| |
|
|
|
|
|
|
| |
Simpler, and leaves the decision to repeat or not fully to the script
(instead of requiring the user to care about it when remapping a script
binding).
|
|
|
|
|
|
| |
MPV_EVENT_SCRIPT_INPUT_DISPATCH is now unused/deprecated.
Also remove a debug-print from defaults.lua.
|
|
|
|
|
| |
Much of it is the same, but now there's the possibility to distinguish
key down/up events in the Lua API.
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, mouse button bindings added by mp.add_key_binding() would be
ignored.
It's possible that this "breaks" some older scripts using undocumented
Lua script functions, but it should be safe otherwise.
Fixes #1283.
|
|
|
|
| |
For these, autorepeat is enabled.
|
|
|
|
|
|
|
|
|
| |
It's passed with the '--format' option to youtube-dl.
If it isn't set, we don't pass '--format best' so that youtube-dl can
use the options from its configuration file.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
| |
This merely adds the file without using it, for the sake of retaining
authorship information.
Signed-off-by: wm4 <wm4@nowhere>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Wether and when the text of a button should be squeezed when it
gets too long can now be configured in the layout:
lo.button.maxchars = <number>
nil = no squeezing (default)
If the button text has more than <maxchars> characters, it will
be squeezed to the estimated width of <maxchars>.
|
| |
|
| |
|
|
|
|
| |
So the user doesn't have to care about the awkward low-level details.
|
|
|
|
| |
now similar to what the status line displays
|
| |
|
|
|
|
|
| |
Now that we use the symbols from the font, we should also
actually use the font.
|
|
|
|
| |
It was an unintended/accidental change.
|
|
|
|
|
| |
For use as playlist navigation button in OSC, now the osd-font
carries all symbols needed by the OSC.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code reorganized to make layouts exchangeable
alternative test layout can be tested with
layout=slimbox
in the OSC config
timers are now used to properly animate the fade out when the
player is paused
duplicate seeks are discarded again
|
|
|
|
|
| |
I'd like to enable this by default, but unfortunately the OSC seems to
have some problems with it.
|
| |
|
| |
|
|
|
|
| |
Fixes #919
|
|
|
|
| |
[osc] Lua error: mp.assdraw:31: attempt to concatenate local 's' (a nil value)
|
|
|
|
|
|
| |
This commit makes the playback start time always at time 0.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
| |
Now a negative timeout mean an infinite timeout. This is similar to the
poll() system call. Apparently this is more intuitive and less confusing
than specifying a "very high" value as timeout if you want to wait
forever.
For callers that never pass negative timeouts, nothing changes.
|
|
|
|
|
| |
This avoids having to poll the "fullscreen" property in the tick
callback.
|
|
|
|
|
| |
calculation the mouse position on the slider relied on how the
hitbox is positioned, change it according to new hitbox size.
|
|
|
|
|
|
| |
should make usage a bit easy
Fixes #810
|
|
|
|
| |
also fix small typo in DOCS
|
| |
|
|
|
|
|
|
|
|
|
| |
Small fixes for the OSC, seektooltip now enabled by default.
Option-parser now moved to separate package, can be used from
other scripts, see DOCS/man/en/lua.rst.
OSC config file location moved to lua-settings/osc.conf
|
|
|
|
| |
We provide some "official" utility functions for this.
|
|
|
|
|
|
|
|
|
|
| |
Although this is something really basic, Lua's standard library doesn't
provide anything like this. Probably because there are too many ways to
do it right or wrong.
This code tries to be really careful when dealing with mixed
arrays/maps, e.g. when a table has integer keys starting from 1, making
it look like an array, but then also has other keys.
|
| |
|
| |
|
|
|
|
|
| |
A low level API was added already earlier, but that was merely a binding
for the raw C API. Add a "proper" one, and document it.
|
|
|
|
|
|
|
|
|
|
|
| |
Now they can be paused and resumed.
Since pausing and disabling the timer is essentially the same underlying
operation, we also just provide one method for it.
mp.cancel_timer probably still works, but I'm considering this
deprecated, and it's removed from the manpage. (We didn't have a release
with this function yet, so no formal deprecation.)
|
|
|
|
| |
Someone requested this... I think.
|
|
|
|
|
| |
Quick hack to impove situtation until the next major overhaul
comes
|
|
|
|
|
|
|
|
|
| |
"enable-osc" will make the OSC appear at any time (although it'll
quickly disappear again if the mouse is not inside the OSC). "disable-
osc" will make it disappear permanently.
Also, if the OSC is visible, force remap the DEL key to make the OSC
disappear.
|
|
|
|
| |
More consistent naming.
|
|
|
|
|
|
|
|
| |
Change script_message to broadcast the message to all clients. Add a new
script_message_to command, which does what the old script_message
command did.
This is intended as simplification, although it might lead to chaos too.
|
|
|
|
|
| |
add_key_binding() didn't work, because it passed a flag that was
renamed. add_forced_key_binding() worked, but did the wrong thing.
|
|
|
|
| |
Apparently this was overlooked when get_timer was renamed to get_time.
|
|
|
|
|
|
|
| |
Lua doesn't distinguish between arrays and maps on the language level;
there are just tables. Use metatables to mark these tables with their
actual types. In particular, it allows distinguishing empty arrays from
empty tables.
|
|
|
|
|
|
| |
Will be more expensive if used very often, but it's probably ok.
Reduce the dependency of lua.c on MPContext a bit further.
|
|
|
|
|
|
|
|
|
| |
E.g. binding MOUSE_BTN0 always used the user defined binding. While it
is ok that the user can override mouse_move and mouse_leave (for
whatever reasons), we want to strictly override the bindings when input
is sent to the OSC itself.
Regression since 03624a1.
|
| |
|
|
|
|
|
|
| |
There are some complications because the client API distinguishes
between integers and floats, while Lua has only "numbers" (which are
usually floats). But I think this should work now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was already an undocumented mechanism provided by
mp.set_key_bindings and other functions, but this was relatively
verbose, and also weird. It was mainly to make the OSC happy (including
being efficient and supporting weird corner cases), while the new
functions try to be a bit simpler.
This also provides a way to let users rebind script-provided commands.
(This mechanism is less efficient, because it's O(n^2) for n added key
bindings, but it shouldn't matter.)
|
|
|
|
|
| |
Nobody will loom at this, and the proper documentation of these
functions is in lua.rst.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, the --no-config was explicitly checked in multiple places to
suppress loading of config files.
Add such a check to the config path code itself, and refuse to resolve
_any_ configuration file locations if the option is set.
osc.lua needs a small fixup, because it didn't handle the situation when
no path was returned. There may some of such cases in the C code too,
but I didn't find any on a quick look.
|
|
|
|
|
|
|
|
| |
Instead, chain them.
Note that there's no logic to prevent the other event handlers to be run
from an event handler (like it's popular in GUI toolkits), because I
think that's not very useful for this purpose.
|
| |
|
|
|
|
|
|
|
|
|
| |
send_command -> command
send_commandv -> commandv
get_timer -> get_time
property_get -> get_property
property_get_string -> get_property_osd
getopt -> get_opt
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is partial only, and it still accesses some MPContext internals.
Specifically, chapter and track lists are still read directly, and OSD
access is special-cased too.
The OSC seems to work fine, except using the fast-forward/backward
buttons. These buttons behave differently, because the OSC code had
certain assumptions how often its update code is called.
The Lua interface changes slightly.
Note that this has the odd property that Lua script and video start
at the same time, asynchronously. If this becomes an issue, explicit
synchronization could be added.
|
| |