]> git.sesse.net Git - vlc/commitdiff
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 86f9645f3db8889bd450fb2ddd7a619ac0cbc7ce..5b0eee4576a72b9bb5f847a15ebfdcdaa076eb5f 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 26f4fa6fa3ec4e1949f52108fa6c25d34a3ca52b..035952992bb0e926f356693d07dccae9dc37f8fc 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>