Amazing Audio Player Events

Question:

I purchased a license  of your Amazing Audio Player and am wondering if i can fire off an ajax call at the end of the mp3 or on a timer during playing of the track.

Answer:

You can use the following code snippet to bind the event when an audio track ends, then in the function, you can fire off your ajax call.

<script type="text/javascript" language="JavaScript">
$(document).ready(function(){
   $("#amazingaudioplayer-1").bind("amazingaudioplayer.ended", function(event, index){ 
     console.log(index);
   });
});
</script>

The amazingaudioplayer-1 in the code is the id of the player div. If you have selected a different ID in the publish dialog, you need to change the number accordingly.

Comments are closed.