1

I need a plugin for JavaScript/jQuery that handles playing audio, but I also need to be able to make my code trigger when it gets to a certain duration (eg. when the song hits 1:06, it displays an alert).

Is this possible? Thanks!

  • have you tried the `.setTimeout()` function? – Hunter McMillen Jul 16 '12 at 13:08
  • I don't believe this is possible. Part of the reason may be that you need to consider all the variations -- what if the user scrubs the playback through 1:06? What if he skips ahead of it? What if the music is paused for thirty seconds before reaching that point? – Blazemonger Jul 16 '12 at 13:08
  • 2
    This might answers your question: http://stackoverflow.com/questions/4993097/html5-display-audio-currenttime – nuala Jul 16 '12 at 13:08
  • @HunterMcMillen Just thought of that now. –  Jul 16 '12 at 13:09
  • @Blazemonger The audio will be playing in the background, no controls. –  Jul 16 '12 at 13:09
  • 4
    Background music with no controls for the user to pause or skip? Shame on you. There's a reason we let MySpace die a slow and painful death. – Blazemonger Jul 16 '12 at 13:10
  • +1 @Blazemonger. I personally never used MySpace but I'm still laughing. – Fabrício Matté Jul 16 '12 at 14:19
  • I needed it to be that way because it was a sort of animation type thing, interactive. –  Aug 06 '12 at 10:44

1 Answers1

2

I am not sure if this is what you want but its worth taking a look...http://popcornjs.org/

Scorpio
  • 1,151
  • 1
  • 19
  • 37