new AudioClip(options)
AudioClip encapsulates an audio recording.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Members
(readonly) Engine :Symbol
Recognition engines.
Type:
- Symbol
- Source:
Methods
download()
Offer the audio clip to the participant as a sound file to download.
- Source:
getDuration() → {Promise.<number>}
Get the duration of the audio clip, in seconds.
- Source:
Returns:
the duration of the audio clip
- Type
- Promise.<number>
setVolume(volume)
Set the volume of the playback.
Parameters:
Name | Type | Description |
---|---|---|
volume |
number | the volume of the playback (must be between 0.0 and 1.0) |
- Source:
startPlayback()
Start playing the audio clip.
- Source:
startPlayback(fadeDurationopt)
Stop playing the audio clip.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fadeDuration |
number |
<optional> |
17 | how long the fading out should last, in ms |
- Source:
upload()
Upload the audio clip to the pavlovia server.
- Source: