function in_play()
{
- input = value('input_mrl');
+ input_iesuxx = value('input_mrl');
if( value('sout_mrl') != '' )
- input += ' '+value('sout_mrl');
- url = 'requests/status.xml?command=in_play&input='+escape(input);
+ input_iesuxx += ' '+value('sout_mrl');
+ url = 'requests/status.xml?command=in_play&input='+escape(input_iesuxx);
loadXMLDoc( url, parse_status );
setTimeout( 'update_playlist()', 1000 );
}
function in_enqueue()
{
- input = value('input_mrl');
+ input_iesuxx = value('input_mrl');
if( value('sout_mrl') != '' )
- input += ' '+value('sout_mrl');
- url = 'requests/status.xml?command=in_enqueue&input='+escape(input);
+ input_iesuxx += ' '+value('sout_mrl');
+ url = 'requests/status.xml?command=in_enqueue&input='+escape(input_iesuxx);
loadXMLDoc( url, parse_status );
setTimeout( 'update_playlist()', 1000 );
}
loadXMLDoc( 'requests/playlist.xml', parse_playlist );
}
+function set_text( id, val )
+{
+ elt = document.getElementById( id );
+ while( elt.hasChildNodes() )
+ elt.removeChild( elt.firstChild );
+ elt.appendChild( document.createTextNode( val ) );
+}
+
function parse_status()
{
if( req.readyState == 4 )
{
if( req.status == 200 )
{
- status = req.responseXML.documentElement;
- document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data );
- document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data );
- if( status.getElementsByTagName( 'volume' ).length != 0 )
- document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%";
- document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data;
- if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" )
+ status_iesuxx = req.responseXML.documentElement;
+ set_text( 'time', format_time( status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data ) );
+ set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) );
+ if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 )
+ set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' );
+ set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data );
+ if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" )
{
document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' );
}
if( req.status == 200 )
{
answer = req.responseXML.documentElement;
- playtree = document.getElementById( 'playtree' );
+ playtree_iesuxx = document.getElementById( 'playtree' );
/* pos = playtree; */
pos = document.createElement( "div" );
pos_top = pos;
pos = pos.parentNode;
}
}
- while( playtree.hasChildNodes() )
- playtree.removeChild( playtree.firstChild );
- playtree.appendChild( pos_top );
+ while( playtree_iesuxx.hasChildNodes() )
+ playtree_iesuxx.removeChild( playtree.firstChild );
+ playtree_iesuxx.appendChild( pos_top );
}
else
{
if( req.status == 200 )
{
answer = req.responseXML.documentElement;
- browser = document.getElementById( 'browser' );
+ browser_iesuxx = document.getElementById( 'browser' );
pos = document.createElement( "div" );
elt = answer.firstChild;
while( elt )
}
elt = elt.nextSibling;
}
- while( browser.hasChildNodes() )
- browser.removeChild( browser.firstChild );
- browser.appendChild( pos );
+ while( browser_iesuxx.hasChildNodes() )
+ browser_iesuxx.removeChild( browser.firstChild );
+ browser_iesuxx.appendChild( pos );
}
else
{
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< index.html: VLC media player web interface
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Browse
</div>
<div id="browser">
- <a href="javascript:browse_dir('~');">Lets browse !</a>
+ <a href="javascript:browse_dir(document.getElementById( 'browse_lastdir' ).value);">Lets browse !</a>
</div>
<div class="controls">
<button id="btn_browse_close" onclick="hide('browse');">