Created
July 11, 2017 18:05
-
-
Save caiw/c27183117e3bc2b721c9fba22e14b7d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://cai.zone/2013/07/a-quick-javascript-hack-to-fake-adjustin-html5-audio-elements-timeupdate-event-frequency/ | |
| var audio_clock; | |
| $(audiohtml).bind("timeupdate", onAudioUpdate); | |
| $(audiohtml).bind("play", function(){ | |
| audio_clock = setInterval(function(){ | |
| onAudioUpdate(); | |
| }, 100); | |
| }); | |
| $(audiohtml).bind("pause", function(){ | |
| clearInterval(audio_clock); | |
| }); | |
| function onAudioUpdate() { | |
| // Move the elements here | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment