Constructor
new AudioBuffer(secondsopt)
AudioBuffer constructor
Name | Type | Attributes | Description |
---|---|---|---|
seconds | number | <optional> | The maximum amount of time allowed to be recorded by this AudioBuffer |
- Source
Members
chunks :Array.<external:Blob>
Array of data chunks collected during the recording
- Array.<external:Blob>
- Source
enabled :boolean
AudioBuffer is enabled only in browsers with navigator.MediaDevices.getuserMedia
- boolean
- Source
mediaPlayer :external:HTMLAudioElement
The HTML audio element used to play the recorded sound
- Source
mediaRecorder :external:MediaRecorder
The object used to record audio data and convert it to a valid stream for the ActiveMediaPlayer
- Source
playWhenFinished :boolean
Instructs this AudioBuffer recorder to start playing the collected audio at the end of the
current mediaRecorder
task.
- boolean
- Source
seconds :number
Maximum length of recordings allowed to this AudioBuffer (in seconds)
- number
- Source
timeoutID :number
The identifier of the timer launched to stop the recording when the maximum time is exceeded.
This member is null
when no timeout function is associated to this AudioBuffer
- number
- Source
(static) MAX_RECORD_LENGTH :number
Maximum amount of time allowed for recordings (in seconds)
- number
- Source
Methods
clear()
Clears all data associated to this AudioBuffer
- Source
play()
Starts playing the currently recorded audio, if any.
- Source
record($divopt)
Starts recording audio, or stops the recording if already started.
Name | Type | Attributes | Description |
---|---|---|---|
$div | external:jQuery | <optional> | Optional |
- Source
stop()
Stops the current operation, either recording or playing audio
- Source
visualFeedbak(enabled, $divopt)
Set visual feedback to the user while the system is recording audio
Currently changes the cursor pointer associated to the HTML element
containing the recorder.
Name | Type | Attributes | Description |
---|---|---|---|
enabled | boolean | Flag indicating if the visual feedback should be active or inactive | |
$div | external:jQuery | <optional> | Optional |
- Source