JavaScript
A5.audio.PlayergetState Method
Syntax
A5.audio.Player.getState()
Returns
- stateobject
The state object of the A5.audio.Player. See A5.audio.Player properties for contents of state.
Description
Refresh and return the state of the A5.audio.Player.
Example: Get the State for a AudioPlayer Control
This example demonstrates how to get the state object for an AudioPlayer control in a UX Component.
// Get the object for the AudioPlayer Control: var audioObj = {dialog.object}.getControl('AUDIOPLAYER'); if (audioObj) { // if the object exists // get the state info for the audio player var audioStateObj = audioObj._play.getState(); // print the audio object's state JSON in an alert alert(JSON.stringify(audioStateObj)); }
The AudioRecorderAndPlayer control's JavaScript object also has a _play property containing methods for the audio player class.
See Also