[vlc-devel] [PATCH] Many patches for using VLC media player Lua's HTTP interface with JSON

Vicente Jiménez googuy at gmail.com
Mon Sep 7 13:57:28 CEST 2009

0004 and 0005 depends on 0003 to work (they need jsonify function).
0006 is independent.

If those patches were accepted, we need also to update
share/lua/http/requests/readme and put some documentation in the wiki.

On Mon, Sep 7, 2009 at 1:50 PM, Vicente Jiménez<googuy at gmail.com> wrote:
> Many patches for using VLC media player Lua's HTTP interface with JSON.
> Initial work.
> Mimic more or less:
>  - browse.xml
>  - vlm.xml
>  - vlm_cmd.xml
> But with JSON responses.
> Missing:
>  - playlist.xml
>  - status.xml
> Obviously, I haven't done playlist.js and status.js because I only use
> VLM. Conversion must be straightforward.
> If you find this work useful and ask for, I'll be glad to do the JSON
> version of those missing.
> vlm_cmd.js has been enhanced outputting the response of the command so
> vlm.js could be replaced by vlm_cmd.js?command=show.
> Why this?
> Because is more easy to control remotely a VLC media player from
> JavaScript using JSON.
> My first approach was to use the traditional HTTP server. Very
> dificult to control other representation that is not XML (or markup)
> based. I have those JSON versions but they're not completely correct
> because I haven't figure a way to remove trailing comas in arrays and
> objects.
> Second approach, was to create a new Lua's JSON interface much like
> Lua's HTTP interface. I've write it, putting all needed functions in
> one file. When complexity grows, I realized how good could be to spit
> code in several files and load them like Lua's HTTP interfce do. But I
> think this could lead to a lot of code rewrite so I adapted the needed
> functions to the third approach.
> Third approach, adapt all those Lua's function to be used inside the
> Lua's HTTP interface. I need mainly JSON responses to requests: A way
> to send VLM command (vlm_cmd.js), a way to see the VLM status (vlm.js)
> and a JSON version of the directory list (browse.js).
> This is the result of this work. Any comment, critic or suggestion are welcome.
> vicente

More information about the vlc-devel mailing list