MediaRecorder

PennController for IBEX Forums Support MediaRecorder

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7112
    jana
    Participant

    Hello,

    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

    #7113
    Jeremy
    Keymaster

    Hello 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,
    Jeremy

    #7456
    jana
    Participant

    Hi 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!
    Jana

    #7465
    Jeremy
    Keymaster

    Hi 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

    #7470
    jana
    Participant

    Great – 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)
    )
    #7471
    Jeremy
    Keymaster

    Hi Jana,

    You should always stop Recorder elements. Try adding getMediaRecorder(row.model+"-words").stop() after getText("instructions").remove() and getMediaRecorder(row.prompt+"-words").stop() after newButton("Done").center().print().wait().remove()

    Jeremy

    #7473
    jana
    Participant

    AH!! Works perfectly – thank you so much Jeremy!!
    Jana

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.