WARNING: recording audio samples requires access to the recording device of your participants. For security concerns, as of June 27, 2018, Chrome (and Chromium) only granted access to the recording device if the script is run from a secured domain. As of June 27, 2018, the domain on which Ibex Farm was hosted did not have the credentials to identify itself as secured. As of June 27, 2018, Firefox still allowed scripts run from domains not identified as secured to access recording devices.
VoiceRecorder elements let you collect audio samples after requesting access to a recording device.
Creation:
newVoiceRecorder("recorder")
If print
is called, this will add two <buttons>
to the page: the button to the left starts/stops recording and the button to the right starts/stops playback.
In order to collect voice recordings, you need to
- upload a PHP file on a server where you can store an archive of the audio recording files. See the page How to collect audio recordings on a server for instructions.
- initiate the recorder before creating a voiceRecorder element, by adding to the items variable a PennController instance that will call
PennController.InitiateRecorder
with the URL of your PHP file, e.g.
[js try=”data”]PennController.InitiateRecorder(“http://myserver/saveVoiceRecordings.php”);
PennController(
newVoiceRecorder(“recorder”)
.print()
,
newButton(“send”, “Click here to send your recording.”)
.print()
.wait()
);[/js]
Actions
[yadawiki-list category=”Action command,VoiceRecorder element”]
Settings
[yadawiki-list category=”Settings command,VoiceRecorder element”]
Tests
[yadawiki-list category=”Test command,VoiceRecorder element”]
Index
- Installing PennController
- Ontology
- Aesthetics
- Preloading resources
- ZIPped resources
- Spreadsheet (CSV)
- Canvas creation
- Setup for audio recordings collection
- Commands by element categories
- Standard Element Commands
- Audio element
- Button element
- Canvas element
- Function element
- Html element
- Image element
- Key element
- Scale element
- Selector element
- Text element
- TextInput element
- Tooltip element
- Timer element
- Var element
- Video element
- VoiceRecorder element
- Youtube element
- Special clear command
- Special end command
- Global PennController Commands
- PennController
- PennController.AddHost
- PennController.AddTable
- PennController.CheckPreloaded
- PennController.DownloadVoiceButton
- PennController.FeedItems
- PennController.Footer
- PennController.GetTable
- PennController.GetURLParameter
- PennController.Header
- PennController.InitiateRecorder
- PennController.PreloadZip
- PennController.ResetPrefix
- PennController.Template