Add function to simulate hotkey presses from the HTTP interface. This is unused in...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 9 Feb 2007 23:57:41 +0000 (23:57 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 9 Feb 2007 23:57:41 +0000 (23:57 +0000)
share/http/js/functions.js
share/http/requests/status.xml

index 86f9645..5b0eee4 100644 (file)
@@ -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 );
index 26f4fa6..0359529 100644 (file)
   <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>