Commit 3fa04773 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

web intf: fix reading position from status.xml

parent c7978950
......@@ -12,6 +12,10 @@ function format_time( s ){
seconds = seconds<10 ? "0"+seconds : seconds;
return hours+":"+minutes+":"+seconds;
}
function toFloat(text)
{
return parseFloat(text.replace(',','.'));
}
function setIntv(){
if(intv>0){
intv++;
......
......@@ -10,7 +10,7 @@ function updateStatus(){
$('#mediaTitle').append($('[name="filename"]',data).text());
$('#totalTime').append(format_time($('length',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)+'%');
$('#volumeSlider').slider({value: ($('volume',data).text()/5.12) });
$('#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