2007-05-18 00:42:16 +02:00
|
|
|
Instructions to code your own VLC Lua playlist script.
|
2007-05-18 16:22:15 +02:00
|
|
|
$Id$
|
2007-05-18 00:42:16 +02:00
|
|
|
|
2008-06-13 00:36:58 +02:00
|
|
|
See lua/README.txt for generic documentation about Lua usage in VLC.
|
|
|
|
|
2007-05-19 16:28:16 +02:00
|
|
|
Examples: See dailymotion.lua, googlevideo.lua, metacafe.lua, youbtube.lua
|
|
|
|
and youtube_homepage.lua .
|
2007-05-18 00:42:16 +02:00
|
|
|
|
|
|
|
VLC Lua playlist modules should define two functions:
|
|
|
|
* probe(): returns true if we want to handle the playlist in this script
|
|
|
|
* parse(): read the incoming data and return playlist item(s)
|
2008-06-13 00:36:58 +02:00
|
|
|
Playlist items use the same format as that expected in the
|
|
|
|
playlist.add() function (see general lua/README.txt)
|
2007-05-18 00:42:16 +02:00
|
|
|
|
|
|
|
VLC defines a global vlc object with the following members:
|
|
|
|
* vlc.path: the URL string (without the leading http:// or file:// element)
|
|
|
|
* vlc.access: the access used ("http" for http://, "file" for file://, etc.)
|
|
|
|
* vlc.peek( <int> ): return the first <int> characters from the playlist file.
|
|
|
|
* vlc.read( <int> ): read <int> characters from the playlist file.
|
2009-04-14 10:24:35 +02:00
|
|
|
THIS FUNCTION CANNOT BE USED IN probe().
|
2007-05-18 00:42:16 +02:00
|
|
|
* vlc.readline(): return a new line of playlist data on each call.
|
2009-04-14 10:24:35 +02:00
|
|
|
THIS FUNCTION CANNOT BE USED IN probe().
|
2007-05-18 00:42:16 +02:00
|
|
|
|
2008-06-13 00:36:58 +02:00
|
|
|
Available VLC specific Lua modules: msg and strings. See lua/README.txt.
|