Commit a0d30029 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

luaHTTP: behave like oldHTTP for seeking

Close #5345
Patch by jikuja
parent 3a6c8349
......@@ -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: ($('time',data).text()/$('length',data).text()*100) })
$('#seekSlider').slider({value: ($('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()) });
......
......@@ -8,7 +8,7 @@ $(function(){
$( "#currentTime" ).empty().append( format_time(Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))) );
switch(current_que){
case 'main':
sendCommand({'command':'seek','val':Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))});
sendCommand({'command':'seek','val':(ui.value)+'%'});
break;
case 'stream':
sendVLMCmd('control Current seek '+ui.value);
......@@ -69,4 +69,4 @@ $(function(){
return false;
});
$('#stream_host').val(stream_server);
})
\ No newline at end of file
})
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