Am unable to execute lua code inside html/xml documents!

Discuss your Lua playlist, album art and interface scripts.
etr
New Cone
New Cone
Posts: 7
Joined: 13 Oct 2011 12:39

Am unable to execute lua code inside html/xml documents!

Postby etr » 13 Oct 2011 21:25

Hello!
I don't know if this subforum or the "Web and Scripting" one is the right place to ask, so I'll ask right here.

I'm trying to create a lua based web interface page that reads some _GET[] parameters and manipulates VLC through the API as a way to serve browser extensions.
My problem is that I seem unable to make <?vlc do_lua_stuff ?> interpreted by the lua engine and instead that tag along it's content is output as if completely unrecognized.

I am on windows xp and start vlc with http interface with this line:

Code: Select all

vlc --extraintf=http --http-src=d:\path\to\my\vlc\lua\http
There I have both etr.html and requests/etr.xml each embedding lua test code, and well, both fail miserably.
Would appreciate some pointers.

etr
New Cone
New Cone
Posts: 7
Joined: 13 Oct 2011 12:39

Re: Am unable to execute lua code inside html/xml documents!

Postby etr » 13 Oct 2011 22:07

Ugh !!! not only did I need to start with this command line instead:

Code: Select all

vlc --extraintf=luaintf --lua-intf=http --http-src=d:/path/to/my/vlc/lua/http
But also had to close the <?xml ?> tag by (copying the official xml documents) print()ing that last ">":

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print('>') ?>
Strange it is, but seems to be working (for now) ...


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 7 guests