]> git.sesse.net Git - vlc/blob - share/http/index.html
HTTP interface patch by Christophe Mutricy (and no fixes by me)
[vlc] / share / http / index.html
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD  XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml10/DTD/xhtml10transitional.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
6  <head>
7     <title>VLC media player</title>
8     <link href="/style.css" title="Default" rel="stylesheet" type="text/css" />
9     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10     <vlc id="control" param1="stop,pause,previous,next,add,sout,play,delete,empty,seek,fullscreen,keep,volume,sort,move" />
11     <vlc id="set" param1="sout" param2="string" />
12 <script type="text/javascript">
13
14 function changeMe(item)
15 {
16   if (item.parentNode.parentNode.lastChild.style.display=="none")
17   {
18     item.parentNode.parentNode.lastChild.style.display="block";
19     item.alt="[-]";
20     item.src="cone_minus.png";
21   }
22   else
23   {
24     item.parentNode.parentNode.lastChild.style.display="none";
25     item.alt="[+]";
26     item.src="cone_plus.png";
27   }
28 }
29 </script>
30
31 </head>
32
33
34  <body>
35     <!-- left menu -->
36     <div class="left">
37       <div class="sectitle">Playback control</div>
38       <div class="section-controls">
39         <form method="get" action="">
40           <p>
41             <input type="submit" name="control" value="stop" />
42             <input type="submit" name="control" value="pause" />
43             <br />
44             <input type="submit" name="control" value="previous" />
45             <input type="submit" name="control" value="next" />
46           </p>
47             <input type="submit" name="seek_value" value="-1min"/><input type="hidden" name="control" value="seek"/>
48             <input type="submit" name="seek_value" value="+1min"/><input type="hidden" name="control" value="seek"/>
49             <br />
50             <input type="text" name="seek_value" size="14"/><input type="hidden" name="control" value="seek"/>
51           </form>
52         <br />
53           <span class="small">( Seek Textbox: for example "+12min 42sec", "01:13:43", "-12%" etc... )</span>
54       </div> <!-- End section -->
55
56       <div class="sectitle">Misc controls</div>
57       <div class="section-controls">
58         <form method="get" action="">
59                <input type="hidden" name="control" value="volume" />
60           Vol: <input type="text" name="value" size="5"/>
61                <input type="submit" value="Set" /><br /> (0 - 1024)<br /><span class="small">(for exemple: "536", "-12", "+42", "36%")</span>
62         </form>
63         <br />
64         <form method="get" action="">
65           <input type="submit" name="control" value="fullscreen" />
66         </form>
67       </div>
68
69       <div class="sectitle">Status</div>
70       <div class="section">
71         State: <vlc id="value" param1="stream_state" /><br />
72         Length: <span id="length"><vlc id="value" param1="stream_length" /> s
73                 </span><br />
74         Time: <span id="time"><vlc id="value" param1="stream_time" /> s</span><br />
75         Volume: <span id="volume"><vlc id="value" param1="volume" /></span>
76         <br /><a href="info.html">Information</a>  
77       </div>
78
79       <div class="section"><a href="/admin/">Administration Page</a></div>
80
81     </div>
82     <!-- end left -->
83
84     <!-- main content -->
85     <div class ="right">
86       <h2 class="title"><a href="http://www.videolan.org/">VLC media player
87         <vlc id="value" param1="version" /></a> (http interface)
88       </h2>
89
90       <div class="sectitle">Add</div>
91       <div class="section">
92         <form method="get" action="" enctype="text/plain" >
93           <table class="add">
94             <tr>
95               <td>Add a MRL (Media Resource Locator) to the playlist</td>
96               <td><input type="text" name="mrl" size="40" /><input type="submit" name="control" value="add" /></td>
97             </tr>
98             <tr>
99               <td>Stream Output:</td>
100               <td><input type="text" name="sout" size="40" value="<vlc id="get" param1="sout" param2="string" />" /><input type="submit" name="control" value="sout" /></td>
101             </tr>
102           </table>
103         </form>
104       </div>
105
106       <div class="section">
107        <form method="get" action="">
108          <ul id="playlist">
109            <vlc id="rpn" param1="first_item 0 store" />
110            <vlc id="rpn" param1="last_depth 0 store" />
111            <vlc id="foreach" param1="pl" param2="playlist" />
112                  <vlc id="if" param1="pl.depth value last_depth value <" />
113                      <vlc id="rpn" param1="pl.depth value ':' last_depth value 1 - ':' 1 strcat strcat strcat strcat" />
114                      <vlc id="foreach" param1="the_final_countdown" param2="integer" />
115                          </ul></li>
116                      <vlc id="end" />
117                  <vlc id="end" />
118
119                <vlc id="if" param1="pl.type value 'Node' strcmp" />
120                  <vlc id="rpn" param1="1 +" />
121                  <li>
122                    <input type="checkbox" name="item" value="<vlc id="value" param1="pl.index" />"/>
123                    <vlc id="if" param1="pl.current" />
124                      <strong>
125                    <vlc id="end" />
126                    <a href="?control=play&amp;item=<vlc id="value" param1="pl.index" />">
127                    <vlc id="value" param1="pl.name" /><vlc id="if" param1="pl.uri value pl.name value strcmp"/>  (<vlc id="value" param1="pl.uri" />)<vlc id="end"/></a>
128                    <vlc id="if" param1="pl.current" />
129                      </strong>
130                    <vlc id="end" />
131                  </li>
132                <vlc id="else" />
133                  <li>
134                    <form method="get" action="">
135                    <vlc id="if" param1="first_item value 0 ="/>
136                    <img alt="Cone" src="cone_plus.png" />
137                      Playlist
138                      <vlc id="rpn" param1="first_item 1 store" />
139                    <vlc id="else"/>
140                    <img alt="[-]" src="cone_minus.png" onclick='changeMe(this)'/>
141                      <vlc id="value" param1="pl.name" /> (<vlc id="value" param1="pl.i_children" /> item<vlc id="if" param1="pl.i_children 1 >" />s<vlc id="end" />)
142                    <vlc id="end"/>
143                      <input type="hidden" name="item" value="<vlc id="value" param1="pl.index" />" />
144                      <input type="submit" name="control" value="sort" /> by
145                      <select name="type">
146                        <option value="title">title</option>
147                        <option value="shuffle">shuffle</option>
148                      </select> with
149                      <select name="order">
150                        <option value="0">normal order</option>
151                        <option value="1">reverse order</option>
152                      </select>
153                    </form>
154
155                    <vlc id="if" param1="pl.i_children 0 !=" />
156                        <ul>
157                    <vlc id="else" />
158                        </li>
159                    <vlc id="end" />
160
161                <vlc id="end" />
162
163                <vlc id="rpn" param1="last_depth pl.depth value store" />
164
165            <vlc id="end" />
166      <vlc id="rpn" param1="0 ':' last_depth value 1 - ':' 1 strcat strcat strcat strcat" />
167      <vlc id="foreach" param1="the_final_countdown" param2="integer" />
168          </ul></li>
169      <vlc id="end" />
170
171          </ul>
172          <input type="submit" name="control" value="delete" />
173          <input type="submit" name="control" value="empty" />
174          <input type="submit" name="control" value="keep" />
175        </form>
176       </div>
177     </div>
178     <!-- end main content -->
179     
180     <p style="text-align:center;font-size:1.2em;"> <vlc id="value" param1="copyright" /> </p>
181
182     <script type="text/javascript">
183       got_time = <vlc id="value" param1="stream_time" />;
184       hours = Math.floor(got_time/ 3600);
185       minutes = Math.floor((got_time/60) % 60);
186       seconds = got_time % 60;
187       if ( hours < 10 ) hours = "0" + hours;
188       if ( minutes < 10 ) minutes = "0" + minutes;
189       if ( seconds < 10 ) seconds = "0" + seconds;
190       document.getElementById('time').innerHTML = hours+":"+minutes+":"+seconds;
191       got_length = <vlc id="value" param1="stream_length" />;
192       hours = Math.floor(got_length/ 3600);
193       minutes = Math.floor((got_length/60) % 60);
194       seconds = got_length % 60;
195       if ( hours < 10 ) hours = "0" + hours;
196       if ( minutes < 10 ) minutes = "0" + minutes;
197       if ( seconds < 10 ) seconds = "0" + seconds;
198       document.getElementById('length').innerHTML = hours+":"+minutes+":"+seconds;
199       got_volume = <vlc id="value" param1="volume" />;
200       document.getElementById( 'volume').innerHTML = Math.ceil(got_volume * 100/1024) + " %";
201     </script>
202 </body>
203 </html>