PennController for IBEX › Forums › Support › Help with recording audio?
Tagged: record warning message
- This topic has 18 replies, 3 voices, and was last updated 1 year, 7 months ago by Larissa_Cury.
-
AuthorPosts
-
May 12, 2023 at 8:22 am #10576Larissa_CuryParticipant
Hi, @Jeremy! Considering the error message, is is possible to put a trial before that?
My idea was: If I cannot change the text, then I’ll display a warning to the kid “Please, wait your teacher”, so that the kid/participant calls the teacher, who will press S and then the message shows up. I tried to do it like this, but the order isn’t changing:// 👉 Experimental trial: Template("new--Items_Wide.csv", row => newTrial("listOfWords", fullscreen() //enable full screen , newMediaRecorder("recorder", "audio").log().record() , newTimer("recording", 3000).log().start() // Start the timer now , newText("words", row.Column1.split('_').join("<br>")) // separate each word with a <br> tag (new line) .cssContainer({ padding: '0.5em', // add some to not get too close to the border 'text-align': 'center', // trying to make the words center on fullscreen -- NOT WORKING :( "justify-content": 'center', "align-items": 'center' , 'font-size': '50px', }) .print() , newKey("NEXT", " ") .callback( // use a callback to execute this in parallel to waiting for the timer getKey("NEXT").remove() // remove the NEXT button , getText("words").text( row.Column2.split('_').join("<br>") ) // update the displayed list of words ) .print() // do not wait for a click, otherwise the timer might elapse before the click , getTimer("recording").wait() // wait for the timer to end , getMediaRecorder("recorder").stop() , getKey("NEXT").remove() // make sure to remove the button, in case the participant didn't get to the second list , getText("words").remove() , newText('time-is-up-msg', "Time is up!").print() , newButton('btn--finish--game', 'Finish Game').print().wait() ) ); // 👉 Completion screen -- WAIT THE TEACHER ///////////////////////////////////////// HERE newTrial("completion_screen", // Exit fullscreen: exitFullscreen() , // Print thank-you msg: newText("thankyou-msg", "Good job, now wait your teacher!") .center() .print() , newKey("NEXT", "S") // , // newButton("void", "") // .wait() ); // 👉 Send results: SendResults(); // 👉 Check if promise is fullfilled // 👉 Manually reject promise => insert dummy link // 👉 Store audio locally newTrial( newFunction("check upload", ()=>PennController.uploadRecordingsError) .test.is() .success( newText("confirmation", "The recordings were sent to the server. ") .print() ) .failure( newText("error", "Click on the link below to store data 👇") .color("red") .print() ) // , // newText("download-manually-msg", DownloadRecordingButton("Click here to download an archive of your recordings.") ) // .print() // , // newTimer("inifinite", 0) // .wait() );
May 12, 2023 at 8:34 am #10577Larissa_CuryParticipantI tried to add a
sequence
element, https://farm.pcibex.net/r/AqPhcF/ . I guess it worked! 🙂 Is there a better way, tho? I don’t think I can manipulate any of these messages, right?- This reply was modified 1 year, 7 months ago by Larissa_Cury.
May 13, 2023 at 4:20 am #10581JeremyKeymaster[ EDIT : changed
setConsent
forconsent
]Hi,
You can use
.consent
onInitiateRecorder()
to change the consent message:InitiateRecorder("https://myserver/uploadVoices/saveRecordings.php" , "<b><center>RESEARCHER, click on the button below to <b style=color:red;>authorize</b> audio recording in the browser 👇</b></center>" ).label("first-trial") .consent("I Consent")
Regarding the error message, you could use the hack described in this post to replace the message
Jeremy
- This reply was modified 1 year, 7 months ago by Jeremy. Reason: changed setConsent for consent
May 15, 2023 at 9:03 am #10590Larissa_CuryParticipantHi, Jeremy! Thank you very much!
-
AuthorPosts
- You must be logged in to reply to this topic.