Slider control for mediaplayer using jquery
- by Geetha
Hi All,
I want to create a slider control to control the video. When the video starts to play the slider has to start moving. If drag the slider to some other position the video has to play from that position. How to achieve this.
Sample code:
<script src="prototype.js" type="text/javascript"></script>
<script src="slider.js" type="text/javascript"></script>
var slider1 = new Control.Slider('handle1', 'track1', {
animate: true,
range: $R(0, document.mediaPlayer.SelectionEnd),
max: document.mediaPlayer.SelectionEnd,
min: 0,
sliderValue: 5,
startSpan: 'span1',
onChange: function(v) { handleSliderChange(v); }
});
function handleSliderChange(value) {
document.mediaPlayer.currentPosition = value;}
Problem:
How to include the automatic move. the slider this working only when we move the handler.