Commit 4763a6a2 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

luahttp: Don't interfere with seek slider either

Ref #6652
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e91edd90
......@@ -17,9 +17,11 @@ function updateStatus() {
$('#mediaTitle').append($('[name="filename"]', data).text());
$('#totalTime').append(format_time($('length', data).text()));
$('#currentTime').append(format_time($('time', data).text()));
if (!$('#seekSlider').data('clicked')) {
$('#seekSlider').slider({
value: toFloat($('position', data).text()) * 100
});
}
$('#currentVolume').append(Math.round($('volume', data).text() / 2.56) + '%');
/* Don't interfere with the user's action */
if (!$('#volumeSlider').data('clicked')) {
......
......@@ -4,6 +4,9 @@ $(function () {
value: 0,
min: 0,
max: 100,
start: function (event, ui) {
$("#seekSlider").data( 'clicked', true );
},
stop: function (event, ui) {
$("#currentTime").empty().append(format_time(Math.round((ui.value / 100) * $('#seekSlider').attr('totalLength'))));
switch (current_que) {
......@@ -17,6 +20,7 @@ $(function () {
sendVLMCmd('control Current seek ' + ui.value);
break;
}
$("#seekSlider").data( 'clicked', false );
}
});
$("#volumeSlider").slider({
......@@ -36,8 +40,9 @@ $(function () {
$("#volumeSlider").data( 'clicked', false );
}
});
/* To ensure that updateStatus() doesn't interfere while use is
* sliding on the control. */
/* To ensure that updateStatus() doesn't interfere while the user
* slides the controls. */
$("#seekSlider").data( 'clicked', false );
$("#volumeSlider").data( 'clicked', false );
$('#buttonStop').click(function () {
switch (current_que) {
......
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