Slider control for mediaplayer using jquery
Posted
by Geetha
on Stack Overflow
See other posts from Stack Overflow
or by Geetha
Published on 2010-04-15T06:38:32Z
Indexed on
2010/04/15
6:43 UTC
Read the original article
Hit count: 779
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.
© Stack Overflow or respective owner