4

I am looking for a web audio player to embed on my website that allows links to jump to a specific time in the audio, a la youtube.

I am uploading lecture audio from lectures that are over an hour. I'd like to provide a way to link to specific times in the audio to jump to different topics, just like in youtube comments where users can enter 00:33 and have it turned in to a link that, when clicked, will jump to 00:33 part of the video. I can't seem to find anything that can do this.

The site is only for myself and a few friends, FYI, so wide compatibility is not required.

3

If you are using the HTML5 audio tag, you can scan the HTML looking for a XX:XX pattern and add a link to a certain function, let say ChangeTime, and then do something like this in Javascript:

function ChangeTime(time){  
    var oAudio = document.getElementById(myAudio);  
    oAudio.pause();  
    oAudio.currentTime = time;  
    oAudio.load(); //for cross browser  
    oAudio.play();  
}

Of couse, you need to see in which format are the currentTime and convert from XX:XX to int format.

3

FlowPlayer has the seek() function for doing this. (No anchors on that page, unfortunately; just do an in-page search.)

JWPlayer has a similar function, though I'm not as familiar with their docs and can't find a specific page at the moment. You'd basically do it like so document.getElementById('playerID').sendEvent('SEEK', 12.5);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.