Commit d9ca6136 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>
(cherry picked from commit 4763a6a249a3280abe346b67238e8f9861a5999f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a7788917
......@@ -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