Created
July 11, 2017 18:05
-
-
Save caiw/c27183117e3bc2b721c9fba22e14b7d7 to your computer and use it in GitHub Desktop.
Revisions
-
caiw created this gist
Jul 11, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // 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 }