The callback object can be structured as follows:
{ onPlayed: function( ) { ... }, onRecorded: function( payload ) { ... }, onStopped: function( payload ) { ... }, onPaused: function( payload ) { ... }, onFailure: function( error ) { ... } }
Name | Description | Return type |
---|---|---|
onPlayed | Called if audio playback finished successfully. | undefined |
onRecorded | Called if audio recording finished successfully. The method's object consists of the following fields:
|
undefined |
onStopped |
Called if audio playing or recording stopped successfully. The method's |
undefined |
onPaused |
Called if audio playing or recording paused successfully. The method's NotePausing the recording is available on iOS only. |
undefined |
onFailure |
Called if an error occurs. It passes the following object:
{ code, description }
Possible failure types are listed in the Constants table, in the Media article. |
undefined |