SoundRecorder Component


Properties

savedRecording
  Specifies the path to the file where the recording should be stored. If this property is the empty string, then starting a recording will create a file in an appropriate location. If the property is not the empty string, it should specify a complete path to a file in an existing directory, including a file name with the extension .3gp.
Data type: string
Designer Writable true <soundrecorder name="soundrecorderName" savedRecording="">
Code Writeable true soundrecorderName.savedRecording = ""
Code Readable true let variable = soundrecorderName.savedRecording

class
  The styling class of the the component
Data type: string
Designer Writable true <soundrecorder name="soundrecorderName" class="Test class">
Code Writeable false
Code Readable false

id
  The styling id of the the component
Data type: string
Designer Writable true <soundrecorder name="soundrecorderName" id="Test id">
Code Writeable false
Code Readable false

name
  The name of the component that will be used to refer to it in code.
Data type: string
Designer Writable true <soundrecorder name="soundrecorderName" name="testComponent">
Code Writeable false
Code Readable false

Methods

Method name Description Parameters
start Starts recording.
soundrecorderName.start()
stop Stops recording.
soundrecorderName.stop()
addEventListener Method used to create event listeners.
See Events below for samples.
eventName string
eventCallbackFunction callback

Events

Event name Description Parameters
afterSoundRecorded Provides the location of the newly created sound.
soundrecorderName.addEventListener(
    "afterSoundRecorded",
    function (sound) {
        //Your code here
    }
)
sound string
startedRecording Indicates that the recorder has started, and can be stopped.
soundrecorderName.addEventListener(
    "startedRecording",
    function () {
        //Your code here
    }
)
stoppedRecording Indicates that the recorder has stopped, and can be started again.
soundrecorderName.addEventListener(
    "stoppedRecording",
    function () {
        //Your code here
    }
)