Browse Source

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.

pull/2/head
Antoine Cellerier 20 years ago
parent
commit
b488ac0eb9
  1. 5
      share/http/js/functions.js
  2. 3
      share/http/requests/status.xml

5
share/http/js/functions.js

@ -381,6 +381,11 @@ function snapshot()
{
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()
{
loadXMLDoc( 'requests/status.xml', parse_status );

3
share/http/requests/status.xml

@ -100,6 +100,9 @@
<vlc id="if" param1="command value 'seek' strcmp 0 =" />
<vlc id="rpn" param1="val value vlc_seek" />
<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" />
<root>

Loading…
Cancel
Save