Rank: Newbie Groups: Member
Joined: 10/6/2011 Posts: 7
|
I'am using the slider for positioning a mp3-file.
The ClientSideOnValueChange event works fine:
function slider_value_changed(slider) { ASPNetMedia.Audio("Audio1").SetPosition(slider.getValue()); }
Also while playing the mp3-file I like to move the thumb according to the position of the mp3-file.
I know there is a setValue() method.
function InitAudio() { var thisAudio = "Audio1"; var myLabelDuration = "LabelDuration1"; var myLabelPosition = "LabelPosition1"; var myLabelTimeLeft = "LabelTimeLeft1"; ASPNetMedia.Audio(thisAudio).OnProgress = function () { SetAudioPosition(thisAudio, myLabelPosition, myLabelTimeLeft); } ASPNetMedia.Audio(thisAudio).OnSeek = function () { SetAudioPosition(thisAudio, myLabelPosition, myLabelTimeLeft); } ASPNetMedia.Audio(thisAudio).OnReady = function () { SetAudioDuration(thisAudio, myLabelDuration, myLabelTimeLeft); } }
// the position changes after Progress or Seek
function SetAudioPosition(thisAudio, myLabelPosition, myLabelTimeLeft) { var position = ASPNetMedia.Audio(thisAudio).GetPosition(); document.getElementById(myLabelPosition).innerHTML = ConvertTime(position); // Converts it to (hh:):mm:ss ???.setValue(position); }
How should I use the setValue() method?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, You would so something like this:
Code: JavaScript
eo_GetObject("Slider1").setValue(....);
Thanks!
|