]> git.sesse.net Git - vlc/blob - share/lua/http/requests/README.txt
Add json capabilities to http requests
[vlc] / share / lua / http / requests / README.txt
1 $Id$
2
3 This file describes commands available through the requests/ file:
4
5 Lines starting with < describe what the page sends back
6 Lines starting with > describe what you can send to the page
7
8 All parameters need to be URL encoded.
9 Examples:
10  # -> %23
11  % -> %25
12  + -> %2B
13  space -> +
14  ...
15
16 status.xml or status.json
17 ===========
18 < Get VLC status information, current item info and meta.
19 < Get VLC version, and http api version
20
21 > add <mrl> to playlist and start playback:
22   ?command=in_play&input=<mrl>
23
24 > add <mrl> to playlist:
25   ?command=in_enqueue&input=<mrl>
26
27 > play playlist item <id>. If <id> is omitted, play last active item:
28   ?command=pl_play&id=<id>
29
30 > toggle pause. If current state was 'stop', play item <id>, if no <id> specified, play current item. If no current item, play 1st item in the playlist:
31   ?command=pl_pause&id=<id>
32
33 > resume playback if paused, else do nothing
34   ?command=pl_forceresume
35
36 > pause playback, do nothing if already paused
37   ?command=pl_forcepause
38
39 > stop playback:
40   ?command=pl_stop
41
42 > jump to next item:
43   ?command=pl_next
44
45 > jump to previous item:
46   ?command=pl_previous
47
48 > delete item <id> from playlist:
49   ?command=pl_delete&id=<id>
50   NOTA BENE: pl_delete is completly UNSUPPORTED
51
52 > empty playlist:
53   ?command=pl_empty
54
55 > set audio delay
56   ?command=audiodelay&val=<delayinseconds>
57
58 > set subtitle delay
59   ?command=subdelay&val=<delayinseconds>
60
61 > set playback rate. must be > 0
62   ?command=rate&val=<newplaybackrate>
63
64 > sort playlist using sort mode <val> and order <id>:
65   ?command=pl_sort&id=<id>&val=<val>
66   If id=0 then items will be sorted in normal order, if id=1 they will be
67   sorted in reverse order
68   A non exhaustive list of sort modes:
69     0 Id
70     1 Name
71     3 Author
72     5 Random
73     7 Track number
74
75 > toggle random playback:
76   ?command=pl_random
77
78 > toggle loop:
79   ?command=pl_loop
80
81 > toggle repeat:
82   ?command=pl_repeat
83
84 > toggle enable service discovery module <val>:
85   ?command=pl_sd&val=<val>
86   Typical values are:
87     sap
88     shoutcast
89     podcast
90     hal
91
92 > toggle fullscreen:
93   ?command=fullscreen
94
95 > set volume level to <val> (can be absolute integer, percent or +/- relative value):
96   ?command=volume&val=<val>
97   Allowed values are of the form:
98     +<int>, -<int>, <int> or <int>%
99
100 > seek to <val>:
101   ?command=seek&val=<val>
102   Allowed values are of the form:
103     [+ or -][<int><H or h>:][<int><M or m or '>:][<int><nothing or S or s or ">]
104     or [+ or -]<int>%
105     (value between [ ] are optional, value between < > are mandatory)
106   examples:
107     1000 -> seek to the 1000th second
108     +1H:2M -> seek 1 hour and 2 minutes forward
109     -10% -> seek 10% back
110
111 playlist.xml:
112 =============
113 < get the full playlist tree
114
115 browse.xml:
116 ===========
117 < ?dir=<dir>
118 > get <dir>'s filelist
119
120 vlm.xml:
121 ========
122 < get the full list of VLM elements
123
124 vlm_cmd.xml:
125 ============
126 < execute VLM command <cmd>
127   ?command=<cmd>
128 > get the error message from <cmd>
129
130 equalizer.xml:
131 =============
132 >command=preamp&val=<val in dB>
133  sets the preamp value, must be >=-20 and <=20
134
135 >command=equalizer&band=<band>&val=<gain in dB, must be >=-20 and <=20)
136
137 <Displays the equalizer band gains.
138 Band 0: 60 Hz, 1: 170 Hz, 2: 310 Hz, 3: 600 Hz, 4: 1 kHz,
139 5: 3 kHz, 6: 6 kHz, 7: 12 kHz , 8: 14 kHz , 9: 16 kHz