Input
-----
input.is_playing(): Return true if input exists.
-input.add_subtitle(url): Add a subtitle to the current input
+input.add_subtitle(url): Add a subtitle file (by path) to the current input
input.item(): Get the current input item. Input item methods are:
:uri(): Get item's URI.
:name(): Get item's name.
Net
---
+----------------------------------------------------------------
+/!\ NB: this namespace is ONLY usable for interfaces and extensions.
+---
+----------------------------------------------------------------
net.url_parse( url, [option delimiter] ): Parse URL. Returns a table with
fields "protocol", "username", "password", "host", "port", path" and
"option".
net.recv( fd, [max length] ): Receive data from fd.
net.poll( { fd = events } ): Implement poll function.
Returns the numbers of file descriptors with a non 0 revent. The function
- modifies the input table to { fd = revents }. See "man poll".
+ modifies the input table to { fd = revents }. See "man poll". This function
+ is not available on Windows.
net.POLLIN/POLLPRI/POLLOUT/POLLRDHUP/POLLERR/POLLHUP/POLLNVAL: poll event flags
-net.read( fd, [max length] ): Read data from fd.
-net.write( fd, string, [length] ): Write data to fd.
+net.read( fd, [max length] ): Read data from fd. This function is not
+ available on Windows.
+net.write( fd, string, [length] ): Write data to fd. This function is not
+ available on Windows.
net.stat( path ): Stat a file. Returns a table with the following fields:
.type
.mode
'artist', 'genre', 'random', 'duration',
'title numeric' or 'album'.
playlist.status(): return the playlist status: 'stopped', 'playing', 'paused' or 'unknown'.
+playlist.delete( id ): check if item of id is in playlist and delete it. returns -1 when invalid id.
+playlist.move( id_item, id_where ): take id_item and if id_where has children, it put it as first children,
+ if id_where don't have children, id_item is put after id_where in same playlist. returns -1 when invalid ids.
FIXME: add methods to get an item's meta, options, es ...
-SD
---
+Services discovery
+------------------
+
+Interfaces and extensions can use the following SD functions:
+
sd.get_services_names(): Get a table of all available service discovery
modules. The module name is used as key, the long name is used as value.
sd.add( name ): Add service discovery.
sd.remove( name ): Remove service discovery.
sd.is_loaded( name ): Check if service discovery is loaded.
+
+Services discovery scripts can use the following SD functions:
+
sd.add_node( ... ): Add a node to the service discovery.
The node object has the following members:
.title: the node's name
var.trigger_callback( object, name ): Trigger the callbacks associated with the
object's "name" variable.
-var.command( object name, name, argument ): Issue "object name"'s "name"
- command with argument "argument".
var.libvlc_command( name, argument ): Issue libvlc's "name" command with
argument "argument".