summaryrefslogtreecommitdiffstats
path: root/player/lua
Commit message (Collapse)AuthorAgeFilesLines
* osc: fix playlist displayChrisK22014-04-091-2/+2
|
* lua: add API for observing property changeswm42014-04-081-0/+26
| | | | | 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.
* lua: give more control over timerswm42014-04-021-9/+30
| | | | | | | | | | | 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.)
* lua: add mp.unregister_event() functionwm42014-04-011-0/+26
| | | | Someone requested this... I think.
* osc: make OSC more responsive when pausedChrisK22014-03-301-0/+1
| | | | | Quick hack to impove situtation until the next major overhaul comes
* osc: add enable/disable message, and map DEL to disabling the OSCwm42014-03-171-0/+14
| | | | | | | | | "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.
* lua: rename mp.register_script_command() to mp.register_script_message()wm42014-03-171-13/+13
| | | | More consistent naming.
* command, lua: change script_message semanticswm42014-03-171-1/+1
| | | | | | | | 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.
* lua: fix add_key_binding()wm42014-03-011-2/+2
| | | | | add_key_binding() didn't work, because it passed a flag that was renamed. add_forced_key_binding() worked, but did the wrong thing.
* lua: fix use of renamed functionwm42014-03-011-3/+3
| | | | Apparently this was overlooked when get_timer was renamed to get_time.
* lua: mark table values returned by get_property_native with their typewm42014-02-261-1/+8
| | | | | | | 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.
* lua: implement mp.get_opt() in Luawm42014-02-261-0/+9
| | | | | | Will be more expensive if used very often, but it's probably ok. Reduce the dependency of lua.c on MPContext a bit further.
* osd: override user bindings for OSC inputwm42014-02-262-3/+3
| | | | | | | | | 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.
* lua, osc: use properties for chapter/track listswm42014-02-241-5/+5
|
* lua: add a bunch of functions to get/set properties by their native typewm42014-02-241-0/+2
| | | | | | 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.
* lua: fix behavior if no script command handler is registeredwm42014-02-231-1/+3
|
* lua: add mechanism for script provided key bindingswm42014-02-171-1/+77
| | | | | | | | | | | | | 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.)
* lua: remove redundant inline documentationwm42014-02-171-4/+0
| | | | | Nobody will loom at this, and the proper documentation of these functions is in lua.rst.
* options: make --no-config block all auto-loaded configuration fileswm42014-02-141-1/+1
| | | | | | | | | | | | 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.
* lua: make register_event() not overwrite previous event handlerwm42014-02-141-4/+11
| | | | | | | | 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.
* lua: some minor API changeswm42014-02-111-2/+5
|
* lua: rename some API functionswm42014-02-111-63/+63
| | | | | | | | | send_command -> command send_commandv -> commandv get_timer -> get_time property_get -> get_property property_get_string -> get_property_osd getopt -> get_opt
* lua: add a timer APIwm42014-02-101-10/+79
|
* lua: port to client APIwm42014-02-102-13/+45
| | | | | | | | | | | | | | | | 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.
* lua: use core log level nameswm42014-01-161-1/+1
| | | | | | When the Lua code was written, the core didn't have names for log levels yet (just numbers). The only user visible change is that "verbose" becomes "v", since this level had different names.
* osc: check for availabillity of percent-pos instead of lengthChrisK22014-01-151-2/+2
| | | | ... to decide wether the seekbar should be enabled or not.
* osc: use mp.send_commandvwm42013-12-201-18/+18
| | | | | See previous commit. Drop no-osd prefixes, as this is the default for send_commandv anyway. send_command should probably be renamed later.
* Move mpvcore/player/ to player/wm42013-12-173-0/+1468