Created
November 9, 2018 04:19
-
-
Save danpastori/e6a76f7302fe07cc3cdbe1787e6d3e4d to your computer and use it in GitHub Desktop.
Run Method When Song Is At Certain Time Amplitude 3.3.1
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
Amplitude.init({ | |
debug: true, | |
songs: [ | |
//Add songs here | |
], | |
callbacks: { | |
'time_update': function(){ | |
var currentTime = Amplitude.getSongPlayedSeconds(); | |
if( currentTime > x ){ | |
yourMethodForTime(); | |
} | |
} | |
} | |
}); | |
function yourMethodForTime(){ | |
//Do your function! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment