Audio.record


Purpose

Starts the recording of an audio file.

Signature

Audio.record( output, options )

Returns

This method does not return anything.

Parameters

Name Description Type Use
output

Passed to set the output configuration. It can be structured as follows:

{
 saveToFile,
 saveToData
}

Please see the table below for details.

object required
options

Passed to set the configuration for the audio file. Default values will be used if the object is empty. It can be structured as follows:

{
 encoding
 outputFormat,
 url
}

Please see the table below for details.

object optional

The table below lists parameters passed via the output object.

Parameter Description Type
saveToFile

Saves to FileEntry URL or a temporary File API URL if the "url" setting is not specified in the options object. By default it is set to "true".

Boolean
saveToData Indicates whether to return a Data URL or not. By default it is set to "false". Boolean

The table below lists parameters passed via the options object.

Parameter Description Type
encoding Sets the codec used to encode audio data. Possible codec types are listed in the Constants table of the Media article. The default setting is ACC. String
outputFormat Sets the file format used to save audio data. Possible output formats are listed in the Constants table of the Media article. The default setting is MPEG_4. String
url A URL address obtained from the FileEntry object by calling the toURL method. The URL's file extension must match the output format specified above (".m4a" for MPEG_4 and ".3gp" for THREE_GPP). If not provided, a URL address of the temporary storage is generated. String

Related topics

Media
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...