Hi All,
I am using the following files to create a slider.
Problem:Needs double click to change the handler position
first click: it move the handler but the following code is not working. a second later it return back to the previous position.
second click on the handler in new position, before it moves back the following code is working.
Needs:
I want change the media player current position with the handler current position value by dragging the handler or single click on the new position of the slider.
Ex:
initial position of the handler:
l--------------------------------
document.mediaPlayer.currentPosition = 0
After dragging it some other position
----------------------l----------
document.mediaPlayer.currentPosition = 125
Code:
var endTime = document.mediaPlayer.SelectionEnd;
$("#slider-constraints").slider({
animate: true,
max: endTime,
range: $R(0, endTime),
value: 1,
enforceConstraints: false,
start:function(event,index){document.mediaPlayer.currentPosition=index.value; $('#slider-constraints').slider("constraints", [0, index.value]); $('#slider-constraints').slider("value", index.value);}
});
window.setInterval(function() {
$('#slider-constraints').slider("value", document.mediaPlayer.currentPosition);
}, 4000);