]> git.sesse.net Git - vlc/blob - share/lua/http/requests/README.txt
a60969c4241d26954e7a63c58eb5cd87aa195d23
[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>&option=<option>
23   the option field is optional, and can have the values:
24     noaudio
25     novideo
26
27 > add <mrl> to playlist:
28   ?command=in_enqueue&input=<mrl>
29
30 > add subtitle to currently playing file
31   ?command=addsubtitle&val=<path>
32
33 > play playlist item <id>. If <id> is omitted, play last active item:
34   ?command=pl_play&id=<id>
35
36 > 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:
37   ?command=pl_pause&id=<id>
38
39 > resume playback if paused, else do nothing
40   ?command=pl_forceresume
41
42 > pause playback, do nothing if already paused
43   ?command=pl_forcepause
44
45 > stop playback:
46   ?command=pl_stop
47
48 > jump to next item:
49   ?command=pl_next
50
51 > jump to previous item:
52   ?command=pl_previous
53
54 > delete item <id> from playlist:
55   ?command=pl_delete&id=<id>
56   NOTA BENE: pl_delete is completly UNSUPPORTED
57
58 > empty playlist:
59   ?command=pl_empty
60
61 > set audio delay
62   ?command=audiodelay&val=<delayinseconds>
63
64 > set subtitle delay
65   ?command=subdelay&val=<delayinseconds>
66
67 > set playback rate. must be > 0
68   ?command=rate&val=<newplaybackrate>
69
70 > set aspect ratio. Must be one of the following values. Any other value will reset aspect ratio to default
71   ?command=aspectratio&val=<newratio>
72   Valid aspect ratio values: 1:1 , 4:3 , 5:4 , 16:9 , 16:10 , 221:100 , 235:100 , 239:100
73
74 > sort playlist using sort mode <val> and order <id>:
75   ?command=pl_sort&id=<id>&val=<val>
76   If id=0 then items will be sorted in normal order, if id=1 they will be
77   sorted in reverse order
78   A non exhaustive list of sort modes:
79     0 Id
80     1 Name
81     3 Author
82     5 Random
83     7 Track number
84
85 > toggle random playback:
86   ?command=pl_random
87
88 > toggle loop:
89   ?command=pl_loop
90
91 > toggle repeat:
92   ?command=pl_repeat
93
94 > toggle enable service discovery module <val>:
95   ?command=pl_sd&val=<val>
96   Typical values are:
97     sap
98     shoutcast
99     podcast
100     hal
101
102 > toggle fullscreen:
103   ?command=fullscreen
104
105 > set volume level to <val> (can be absolute integer, percent or +/- relative value):
106   ?command=volume&val=<val>
107   Allowed values are of the form:
108     +<int>, -<int>, <int> or <int>%
109
110 > seek to <val>:
111   ?command=seek&val=<val>
112   Allowed values are of the form:
113     [+ or -][<int><H or h>:][<int><M or m or '>:][<int><nothing or S or s or ">]
114     or [+ or -]<int>%
115     (value between [ ] are optional, value between < > are mandatory)
116   examples:
117     1000 -> seek to the 1000th second
118     +1H:2M -> seek 1 hour and 2 minutes forward
119     -10% -> seek 10% back
120
121 >command=preamp&val=<val in dB>
122  sets the preamp value, must be >=-20 and <=20
123
124 >command=equalizer&band=<band>&val=<gain in dB, must be >=-20 and <=20)
125  set the gain for a specific band
126
127 >command=enableeq&val=<0 or 1>
128  0 --  disables the equalizer
129  1 --  enables the equalizer
130
131 >command=setpreset&val=<presetid>
132  set the equalizer preset as per the id specified
133
134 <Displays the equalizer band gains.
135 Band 0: 60 Hz, 1: 170 Hz, 2: 310 Hz, 3: 600 Hz, 4: 1 kHz,
136 5: 3 kHz, 6: 6 kHz, 7: 12 kHz , 8: 14 kHz , 9: 16 kHz
137
138 <Display the list of presets available for the equalizer
139
140 playlist.xml or playlist.json:
141 =============
142 < get the full playlist tree
143
144 NB: playlist_jstree.xml is used for the internal web client. It should not be relied upon by external remotes.
145 It may be removed without notice.
146
147 browse.xml:
148 ===========
149
150 < ?dir=<uri>
151 > get file list from uri. At the moment, only local file uris are supported
152
153 NB: uri is the preferred parameter. Dir is deprecated and may be removed in a future release.
154 < ?dir=<dir>
155 > get <dir>'s filelist
156
157 vlm.xml:
158 ========
159 < get the full list of VLM elements
160
161 vlm_cmd.xml:
162 ============
163 < execute VLM command <cmd>
164   ?command=<cmd>
165 > get the error message from <cmd>
166