Hi I am using I IonRangeSlider ( version 2.0.6) and would like to know which handle is been dragged in other to perform a audio seek on that information. Currently this code does not help.
$('#scrubber').ionRangeSlider( {
min: 0,
max: 50,
from: 10,
to: 20,
type: 'double',
keyboard: false,
onChange: function ( e ) {
var start = e.from,
end = e.to;
/*Bug here*/
audio.currentTime = start;
audio.currentTime = end;
}
} );
The onChange method does not help since this does not provide information on whether the left (start ) or right (end ) handle is currently being dragged. it initiates as long as there is a change in value What I would want to have is some like.
/* start */
onLeftHandleChange:function(start){
audio.currentTime = start;
}
/* end */
onRightHandleChange: function(end){
audio.currentTime = end
}
/*----------------------------------------------------------------*/
OR
/*--------------------------------------------------------------*/
if(start value changes){
audio.currentTime = start
}
if(end value changes) {
audio.currentTime = end
}
I have read the documentation and cant seem to find any method that does this.
The dom element updates the slider (.irs-from) and (.irs-to) respectively without having to update all of them at once thereby giving me hope
Any help or a different plugin would be much appreciated.I have already used dxRangeSlider and it also has the same problem