JavaScript

A5.audio.Playerstop Method

Syntax

A5.audio.Player.stop()

Description

Stop audio playback and set the current time back to "0".

Example: Stopping Playback for the AudioPlayer Control 

The UX Component AudioPlayer control's JavaScript object can be used to control the audio playback on the client. The _play property of the object contains the audio player class methods. The JavaScript below demonstrates how to stop the audio playback for an AudioPlayer control:

// Get the object for the AudioPlayer Control:
var audioObj = {dialog.object}.getControl('AUDIOPLAYER');

if (audioObj) {
    // stop playback
    audioObj._play.stop();
}
The AudioRecorderAndPlayer control's JavaScript object also has a _play property containing methods for the audio player class.

See Also