mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
change internal docs links: /reference/jspsych.md#jspsychinit => initjspsych
This commit is contained in:
parent
2defc04652
commit
f91141ac94
@ -30,7 +30,7 @@ To prevent these errors, jsPsych uses a 'safe mode' when it detects that the HTM
|
|||||||
* **Web Audio is disabled** (even if `use_webaudio` is set to `true` in `initJsPsych`). The WebAudio API option is used by default because it allows more precise measurement of response times relative to the onset of the audio. But because WebAudio doesn't work offline, audio will be played using HTML5 audio instead. This is equivalent to setting `use_webaudio` to `false` in `initJsPsych`.
|
* **Web Audio is disabled** (even if `use_webaudio` is set to `true` in `initJsPsych`). The WebAudio API option is used by default because it allows more precise measurement of response times relative to the onset of the audio. But because WebAudio doesn't work offline, audio will be played using HTML5 audio instead. This is equivalent to setting `use_webaudio` to `false` in `initJsPsych`.
|
||||||
* **Video preloading is disabled** (both automatic and manual preloading via the `preload` plugin). Videos will still play when you run your experiment offline, but they will load _during_ the experiment, which might cause noticeable delays before video playback starts.
|
* **Video preloading is disabled** (both automatic and manual preloading via the `preload` plugin). Videos will still play when you run your experiment offline, but they will load _during_ the experiment, which might cause noticeable delays before video playback starts.
|
||||||
|
|
||||||
This safe mode feature is controlled by the `override_safe_mode` parameter in [`initJsPsych`](/reference/jspsych.md#jspsychinit), which defaults to `false`. If you leave this setting as the default, then you won't need to worry about CORS errors while running your experiment offline, or remembering to change your `initJsPsych` settings when you move the experiment online.
|
This safe mode feature is controlled by the `override_safe_mode` parameter in [`initJsPsych`](/reference/jspsych.md#initjspsych), which defaults to `false`. If you leave this setting as the default, then you won't need to worry about CORS errors while running your experiment offline, or remembering to change your `initJsPsych` settings when you move the experiment online.
|
||||||
|
|
||||||
It's possible to override jsPsych's safe mode by setting `override_safe_mode` to `true` in `initJsPsych`. One reason you might do this is if you've disabled web security features in your browser (see [here](https://alfilatov.com/posts/run-chrome-without-cors/) and [here](https://stackoverflow.com/questions/4819060/allow-google-chrome-to-use-xmlhttprequest-to-load-a-url-from-a-local-file) for instructions in Chrome), which is safe to do if you know what you're doing. If your experiment does not use Web Audio or preloaded videos, then jsPsych's safe mode feature will not have any effect.
|
It's possible to override jsPsych's safe mode by setting `override_safe_mode` to `true` in `initJsPsych`. One reason you might do this is if you've disabled web security features in your browser (see [here](https://alfilatov.com/posts/run-chrome-without-cors/) and [here](https://stackoverflow.com/questions/4819060/allow-google-chrome-to-use-xmlhttprequest-to-load-a-url-from-a-local-file) for instructions in Chrome), which is safe to do if you know what you're doing. If your experiment does not use Web Audio or preloaded videos, then jsPsych's safe mode feature will not have any effect.
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ This installs the core jsPsych package. Plugins and extensions are installed sep
|
|||||||
|
|
||||||
### Step 2: Import the JsPsych class and create a new instance
|
### Step 2: Import the JsPsych class and create a new instance
|
||||||
|
|
||||||
We create a new instance of `JsPsych`. The instance can be configured via [a variety of options](/reference/jspsych.md#jspsychinit), passed as an object to the constructor.
|
We create a new instance of `JsPsych`. The instance can be configured via [a variety of options](/reference/jspsych.md#initjspsych), passed as an object to the constructor.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import {JsPsych} from 'jspsych';
|
import {JsPsych} from 'jspsych';
|
||||||
|
Loading…
Reference in New Issue
Block a user