PennController for IBEX › Forums › Support › MediaRecorder
Tagged: MediaRecorder
- This topic has 6 replies, 2 voices, and was last updated 2 years, 10 months ago by
jana.
-
AuthorPosts
-
July 8, 2021 at 11:12 am #7112
jana
ParticipantHello,
Apologies in advance for a blunt question.
We are building ‘oral production experiment’ using MediaRecorder.
Please could you explain (in layman terms) how to obtain a “URL that points to a PHP file on your own webserver”, and could google drive be used for this? Apologies if this questions should be aimed at web server support team.// Replace the URL with one that points to a PHP file on your own webserver
InitiateRecorder(“http://files.lab.florianschwarz.net/ibexfiles/PennController/SampleTrials/”).label(“init”)// This creates a trial labeled ‘async’ that will upload
// all the samples recorded by the time it is run
UploadRecordings(“async”,”noblock”)It is fantastic to be able to do production experiments on-line!! Massive thank you!
Jana
July 8, 2021 at 12:16 pm #7113Jeremy
KeymasterHello Jana,
The documentation has a guide on how to set up multimedia recording. You need to save a
.php
file with the content from the code block under “Server setup” and upload it to your webserver. There exist commercial services to obtain webserver space (eg. DreamHost) and some institutions (eg. universities) also provide some webserver space to their members. Google Drive cannot be used to run PHP scripts (it’s a cloud service, not a webserver)Alternatively, you can send the recordings to an S3 bucket, but the setup is somewhat more complicated in this case
Let me know if you have questions,
JeremyOctober 29, 2021 at 4:13 pm #7456jana
ParticipantHi Jermeny,
Thanks again for the advice above, it works great!
Another question…
Is it possible to save the recording to two locations – a secure server and to a local PC (as per OralProduction (Media recorder) example), just to be sure if one option fails we don’t lose the recordings.
Many thanks!
JanaNovember 2, 2021 at 1:15 pm #7465Jeremy
KeymasterHi Jana,
The behavior you see with the OralProduction (MediaRecorder) project is the default behavior: if the upload request fails, participants will see a link to download an archive with their recordings. If you want to force that to happen, you can use
DownloadRecordingButton
(there’s a code piece that illustrates its use on the documentation page)Jeremy
November 3, 2021 at 10:46 am #7470jana
ParticipantGreat – thank you Jeremy! I found it in the documents page and will test it out.
Just to report a weird thing happening with the recording’s titles.
We are running an elicited production task with model sentence and prompt appearing on consecutive screen both being recorded individually. What’s happening is that the recording of the prompt is saved under the model sentence example and vice versa.
I’m copying the relevant part of the code below to check if I made and error that might be causing it. Many thanks!!!Template( "experiment.csv" , row => newTrial( "stimuli" , // Start recording newMediaRecorder(row.model+"-words", "audio").log().record() , newText("instructions", "<strong>"+row.model+"</strong>") .center() .print() , newButton("Done").center().print().wait().remove(), getText("instructions").remove() , newMediaRecorder(row.prompt+"-words", "audio").log().record() , newText("instructions", "<strong>"+row.prompt+"</strong>") .center() .print() , newButton("Done").center().print().wait().remove() ) // Report which letter this trial is about in the results file .log("model", row.model) .log("prompt", row.prompt) .log("cond", row.cond) .log("item", row.item) )
November 3, 2021 at 11:04 am #7471Jeremy
KeymasterHi Jana,
You should always stop Recorder elements. Try adding
getMediaRecorder(row.model+"-words").stop()
aftergetText("instructions").remove()
andgetMediaRecorder(row.prompt+"-words").stop()
afternewButton("Done").center().print().wait().remove()
Jeremy
November 3, 2021 at 5:10 pm #7473jana
ParticipantAH!! Works perfectly – thank you so much Jeremy!!
Jana -
AuthorPosts
- You must be logged in to reply to this topic.