PennController.UploadRecordings() (since PennController 1.8)
PennController.UploadRecordings("label" , "noblock")
You can specify a label so as to control when the UploadRecordings is to be run in the flow of your experiment, by referencing the label in Sequence.
The trial will wait until the recordings are successfully sent, or until an error occurs, before moving to the next trial. Specify "noblock" as the second argument, after the label, if you want the next trial to start immediately, even if the send request has not completed yet.
A final UploadRecordings trial is automatically inserted before your results are sent to the experiment’s server, which will wait until all the upload requests have completed before proceeding to sending the results.
Sequence( "intro" , sepWith("sendAsync", "recordTrial") ) InitiateRecorder("https://my.server/path/to/uploadScript.php") .label("intro") UploadRecordings("sendAsync", "noblock") newTrial("recordTrial", newText("Please act happiness").print() , newMediaRecorder("happiness").print().log().wait() ) newTrial("recordTrial", newText("Please act sadness").print() , newMediaRecorder("happiness").print().log().wait() )
Will start sending each video sample to the server immediately after it is recorded.