Commit 3fa04773 authored by Francois Cartegnie's avatar Francois Cartegnie

web intf: fix reading position from status.xml

parent c7978950
...@@ -12,6 +12,10 @@ function format_time( s ){ ...@@ -12,6 +12,10 @@ function format_time( s ){
seconds = seconds<10 ? "0"+seconds : seconds; seconds = seconds<10 ? "0"+seconds : seconds;
return hours+":"+minutes+":"+seconds; return hours+":"+minutes+":"+seconds;
} }
function toFloat(text)
{
return parseFloat(text.replace(',','.'));
}
function setIntv(){ function setIntv(){
if(intv>0){ if(intv>0){
intv++; intv++;
......
...@@ -10,7 +10,7 @@ function updateStatus(){ ...@@ -10,7 +10,7 @@ function updateStatus(){
$('#mediaTitle').append($('[name="filename"]',data).text()); $('#mediaTitle').append($('[name="filename"]',data).text());
$('#totalTime').append(format_time($('length',data).text())); $('#totalTime').append(format_time($('length',data).text()));
$('#currentTime').append(format_time($('time',data).text())); $('#currentTime').append(format_time($('time',data).text()));
$('#seekSlider').slider({value: ($('position',data).text()*100) }); $('#seekSlider').slider({value: toFloat($('position',data).text()) * 100 });
$('#currentVolume').append(Math.round($('volume',data).text()/5.12)+'%'); $('#currentVolume').append(Math.round($('volume',data).text()/5.12)+'%');
$('#volumeSlider').slider({value: ($('volume',data).text()/5.12) }); $('#volumeSlider').slider({value: ($('volume',data).text()/5.12) });
$('#rateSlider').slider({value: ($('rate',data).text()) }); $('#rateSlider').slider({value: ($('rate',data).text()) });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment