Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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);

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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