Tests whether the participant has granted webGazer access to their webcam, as required by the EyeTracker.
- Use this early in your experiment, and most usefully in the
waitcommand of a Button to proceed only after access has been granted.
@newButton("Start") @ .print() $ .wait( newEyeTracker().test.ready() $ .failure( newText("Please grant access to your webcam").print() ) @ )
Adds a button onto the page and wait for the participant to click it. The presence of the EyeTracker element inside
waitalso triggers the webcam-access request. The test will only be successful after access has been granted: only then will a click on the button be validated.
If the participant clicks the button before granting access to the webcam, they will see a message inviting them to do so.