![]() ![]() Web Audio is disabled (even if use_webaudio is set to true in initJsPsych).Specifically, when a jsPsych experiment runs offline: To prevent these errors, jsPsych uses a 'safe mode' when it detects that the HTML page is running via the file:// protocol, and if so, automatically disables the features that don't work in that context. If your experiment uses these features, then CORS errors will prevent the experiment from running. However, when you run your experiment offline, the CORS policy blocks some jsPsych features that require loading local files. This isn't a problem when your study runs online, because in that case your experiment files all have the same origin. Web browsers have a security policy called cross-origin resource sharing (CORS) that determines whether the webpage can request files that come from a different origin (i.e. Cross-origin requests (CORS) and safe mode ¶ Note that, unless noted, here we're using the word "server" to mean either a local server (which runs on your computer and only makes the experiment files available from within that computer, and is often used during development), or a remote server (which does not run on your computer and does share your experiment files over the internet). There are some important differences between the way the experiment runs offline compared to online via a web server. It's usually the fastest and easiest way to run through an experiment, and is very useful while writing and testing the code.Īt some point you will need to move your experiment files onto a server and send the data to a database, since this is how you will ultimately collect the data (unless you're planning to collect data on your local computer). You can run your jsPsych experiment offline by opening the HTML file directly in a web browser, for instance by double-clicking on it. JsPsych Builder can also directly build JATOS experiment files (.jzip) that you can upload to a JATOS server (see this section below for more info about JATOS and other server options). It automatically bundles scripts and style sheets, configures media preloading, and yields a zip file that contains all files for deployment (online or offline). If you are looking for a tool to automate deployment-related tasks, check out the jsPsych Builder CLI utility. Hosting the Experiment and Saving the DataĮxclude Participants Based on Browser Features Demo Experiment: Simple Reaction Time Taskĭata Storage, Aggregation, and ManipulationĬross-origin requests (CORS) and safe mode ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |