VoiceRecorder element

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

  1. 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.
  2. 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”]