Play and Pause Audio Player with API

Question:

Hi Support:

I have purchased your Amazing Audio Player commercial version.

Is it possible to create a text link on a given page that will effect a play/pause action in the Amazing Audio Player on that page?

Thank you for any information you can provide on this matter.

Answer:

You can call the following JavaScript function to play/pause the player:

amazingAudioPlayerObjects.objects[0].playAudio();
amazingAudioPlayerObjects.objects[0].pauseAudio();

You can call the following JavaScript function to goto the second and fifth song and play:

amazingAudioPlayerObjects.objects[0].audioRun(1, true);
amazingAudioPlayerObjects.objects[0].audioRun(4, true);

The amazingAudioPlayerObjects is a global object created by the player.

For example, the following two text links will play/pause the audio player:

<a href=”javascript:amazingAudioPlayerObjects.objects[0].playAudio();”>Click to Play</a>
<a href=”javascript:amazingAudioPlayerObjects.objects[0].pauseAudio();”>Click to Pause</a>

The following two text links will play the second and fifth song:

<a href=”javascript:amazingAudioPlayerObjects.objects[0].audioRun(1, true);”>Click to Play</a>
<a href=”javascript:amazingAudioPlayerObjects.objects[0].audioRun(4, true);”>Click to Pause</a>

A demo is as following:

Click to Play

Click to Pause

Play the second song

Play the fifth song