Commit b488ac0e authored by Antoine Cellerier's avatar Antoine Cellerier

Add function to simulate hotkey presses from the HTTP interface. This is...

Add function to simulate hotkey presses from the HTTP interface. This is unused in the current pages. Patch courtesy of neilfred on the forums ( http://forum.videolan.org/viewtopic.php?t=31871 ). Someone now needs to add the missing buttons to the HTML code.
parent 7570b2bf
...@@ -381,6 +381,11 @@ function snapshot() ...@@ -381,6 +381,11 @@ function snapshot()
{ {
loadXMLDoc( 'requests/status.xml?command=snapshot', parse_status ); loadXMLDoc( 'requests/status.xml?command=snapshot', parse_status );
} }
function hotkey( str )
{
/* Use hotkey name (without the "key-" part) as the argument to simulate a hotkey press */
loadXMLDoc( 'requests/status.xml?command=key&val='+str, parse_status );
}
function update_status() function update_status()
{ {
loadXMLDoc( 'requests/status.xml', parse_status ); loadXMLDoc( 'requests/status.xml', parse_status );
......
...@@ -100,6 +100,9 @@ ...@@ -100,6 +100,9 @@
<vlc id="if" param1="command value 'seek' strcmp 0 =" /> <vlc id="if" param1="command value 'seek' strcmp 0 =" />
<vlc id="rpn" param1="val value vlc_seek" /> <vlc id="rpn" param1="val value vlc_seek" />
<vlc id="end"/> <vlc id="end"/>
<vlc id="if" param1="command value 'key' strcmp 0 =" />
<vlc id="rpn" param1="'key-' val value strcat 'VLC_OBJECT_VLC' vlc_var_get key-pressed 'VLC_OBJECT_VLC' vlc_var_set" />
<vlc id="end"/>
<vlc id="end" /> <vlc id="end" />
<root> <root>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment