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