PennController.UploadRecordings() (since PennController 1.8)
PennController.UploadRecordings("label" , "noblock")
Creates a trial which, when executed, will send the recordings collected so far via the MediaRecorder element to the URL provided to InitiateRecorder.
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.
[js highlight=”4,10″ try=”data”]Sequence(
newText(“Please act out happiness”).print()
newText(“Please act out sadness”).print()
Will start sending each video sample to the server immediately after it is recorded.