@jspsych/plugin-audio-keyboard-response 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,115 +1,115 @@
1
- import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
- declare const info: {
3
- readonly name: "audio-keyboard-response";
4
- readonly parameters: {
5
- /** The audio file to be played. */
6
- readonly stimulus: {
7
- readonly type: ParameterType.AUDIO;
8
- readonly pretty_name: "Stimulus";
9
- readonly default: any;
10
- };
11
- /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
12
- readonly choices: {
13
- readonly type: ParameterType.KEYS;
14
- readonly pretty_name: "Choices";
15
- readonly default: "ALL_KEYS";
16
- };
17
- /** Any content here will be displayed below the stimulus. */
18
- readonly prompt: {
19
- readonly type: ParameterType.HTML_STRING;
20
- readonly pretty_name: "Prompt";
21
- readonly default: any;
22
- };
23
- /** The maximum duration to wait for a response. */
24
- readonly trial_duration: {
25
- readonly type: ParameterType.INT;
26
- readonly pretty_name: "Trial duration";
27
- readonly default: any;
28
- };
29
- /** If true, the trial will end when user makes a response. */
30
- readonly response_ends_trial: {
31
- readonly type: ParameterType.BOOL;
32
- readonly pretty_name: "Response ends trial";
33
- readonly default: true;
34
- };
35
- /** If true, then the trial will end as soon as the audio file finishes playing. */
36
- readonly trial_ends_after_audio: {
37
- readonly type: ParameterType.BOOL;
38
- readonly pretty_name: "Trial ends after audio";
39
- readonly default: false;
40
- };
41
- /** If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a response is accepted. */
42
- readonly response_allowed_while_playing: {
43
- readonly type: ParameterType.BOOL;
44
- readonly pretty_name: "Response allowed while playing";
45
- readonly default: true;
46
- };
47
- };
48
- };
49
- declare type Info = typeof info;
50
- /**
51
- * **audio-keyboard-response**
52
- *
53
- * jsPsych plugin for playing an audio file and getting a keyboard response
54
- *
55
- * @author Josh de Leeuw
56
- * @see {@link https://www.jspsych.org/plugins/jspsych-audio-keyboard-response/ audio-keyboard-response plugin documentation on jspsych.org}
57
- */
58
- declare class AudioKeyboardResponsePlugin implements JsPsychPlugin<Info> {
59
- private jsPsych;
60
- static info: {
61
- readonly name: "audio-keyboard-response";
62
- readonly parameters: {
63
- /** The audio file to be played. */
64
- readonly stimulus: {
65
- readonly type: ParameterType.AUDIO;
66
- readonly pretty_name: "Stimulus";
67
- readonly default: any;
68
- };
69
- /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
70
- readonly choices: {
71
- readonly type: ParameterType.KEYS;
72
- readonly pretty_name: "Choices";
73
- readonly default: "ALL_KEYS";
74
- };
75
- /** Any content here will be displayed below the stimulus. */
76
- readonly prompt: {
77
- readonly type: ParameterType.HTML_STRING;
78
- readonly pretty_name: "Prompt";
79
- readonly default: any;
80
- };
81
- /** The maximum duration to wait for a response. */
82
- readonly trial_duration: {
83
- readonly type: ParameterType.INT;
84
- readonly pretty_name: "Trial duration";
85
- readonly default: any;
86
- };
87
- /** If true, the trial will end when user makes a response. */
88
- readonly response_ends_trial: {
89
- readonly type: ParameterType.BOOL;
90
- readonly pretty_name: "Response ends trial";
91
- readonly default: true;
92
- };
93
- /** If true, then the trial will end as soon as the audio file finishes playing. */
94
- readonly trial_ends_after_audio: {
95
- readonly type: ParameterType.BOOL;
96
- readonly pretty_name: "Trial ends after audio";
97
- readonly default: false;
98
- };
99
- /** If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a response is accepted. */
100
- readonly response_allowed_while_playing: {
101
- readonly type: ParameterType.BOOL;
102
- readonly pretty_name: "Response allowed while playing";
103
- readonly default: true;
104
- };
105
- };
106
- };
107
- private audio;
108
- constructor(jsPsych: JsPsych);
109
- trial(display_element: HTMLElement, trial: TrialType<Info>, on_load: () => void): Promise<unknown>;
110
- simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
111
- private simulate_data_only;
112
- private simulate_visual;
113
- private create_simulation_data;
114
- }
115
- export default AudioKeyboardResponsePlugin;
1
+ import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
+ declare const info: {
3
+ readonly name: "audio-keyboard-response";
4
+ readonly parameters: {
5
+ /** The audio file to be played. */
6
+ readonly stimulus: {
7
+ readonly type: ParameterType.AUDIO;
8
+ readonly pretty_name: "Stimulus";
9
+ readonly default: any;
10
+ };
11
+ /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
12
+ readonly choices: {
13
+ readonly type: ParameterType.KEYS;
14
+ readonly pretty_name: "Choices";
15
+ readonly default: "ALL_KEYS";
16
+ };
17
+ /** Any content here will be displayed below the stimulus. */
18
+ readonly prompt: {
19
+ readonly type: ParameterType.HTML_STRING;
20
+ readonly pretty_name: "Prompt";
21
+ readonly default: any;
22
+ };
23
+ /** The maximum duration to wait for a response. */
24
+ readonly trial_duration: {
25
+ readonly type: ParameterType.INT;
26
+ readonly pretty_name: "Trial duration";
27
+ readonly default: any;
28
+ };
29
+ /** If true, the trial will end when user makes a response. */
30
+ readonly response_ends_trial: {
31
+ readonly type: ParameterType.BOOL;
32
+ readonly pretty_name: "Response ends trial";
33
+ readonly default: true;
34
+ };
35
+ /** If true, then the trial will end as soon as the audio file finishes playing. */
36
+ readonly trial_ends_after_audio: {
37
+ readonly type: ParameterType.BOOL;
38
+ readonly pretty_name: "Trial ends after audio";
39
+ readonly default: false;
40
+ };
41
+ /** If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a response is accepted. */
42
+ readonly response_allowed_while_playing: {
43
+ readonly type: ParameterType.BOOL;
44
+ readonly pretty_name: "Response allowed while playing";
45
+ readonly default: true;
46
+ };
47
+ };
48
+ };
49
+ type Info = typeof info;
50
+ /**
51
+ * **audio-keyboard-response**
52
+ *
53
+ * jsPsych plugin for playing an audio file and getting a keyboard response
54
+ *
55
+ * @author Josh de Leeuw
56
+ * @see {@link https://www.jspsych.org/plugins/jspsych-audio-keyboard-response/ audio-keyboard-response plugin documentation on jspsych.org}
57
+ */
58
+ declare class AudioKeyboardResponsePlugin implements JsPsychPlugin<Info> {
59
+ private jsPsych;
60
+ static info: {
61
+ readonly name: "audio-keyboard-response";
62
+ readonly parameters: {
63
+ /** The audio file to be played. */
64
+ readonly stimulus: {
65
+ readonly type: ParameterType.AUDIO;
66
+ readonly pretty_name: "Stimulus";
67
+ readonly default: any;
68
+ };
69
+ /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
70
+ readonly choices: {
71
+ readonly type: ParameterType.KEYS;
72
+ readonly pretty_name: "Choices";
73
+ readonly default: "ALL_KEYS";
74
+ };
75
+ /** Any content here will be displayed below the stimulus. */
76
+ readonly prompt: {
77
+ readonly type: ParameterType.HTML_STRING;
78
+ readonly pretty_name: "Prompt";
79
+ readonly default: any;
80
+ };
81
+ /** The maximum duration to wait for a response. */
82
+ readonly trial_duration: {
83
+ readonly type: ParameterType.INT;
84
+ readonly pretty_name: "Trial duration";
85
+ readonly default: any;
86
+ };
87
+ /** If true, the trial will end when user makes a response. */
88
+ readonly response_ends_trial: {
89
+ readonly type: ParameterType.BOOL;
90
+ readonly pretty_name: "Response ends trial";
91
+ readonly default: true;
92
+ };
93
+ /** If true, then the trial will end as soon as the audio file finishes playing. */
94
+ readonly trial_ends_after_audio: {
95
+ readonly type: ParameterType.BOOL;
96
+ readonly pretty_name: "Trial ends after audio";
97
+ readonly default: false;
98
+ };
99
+ /** If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a response is accepted. */
100
+ readonly response_allowed_while_playing: {
101
+ readonly type: ParameterType.BOOL;
102
+ readonly pretty_name: "Response allowed while playing";
103
+ readonly default: true;
104
+ };
105
+ };
106
+ };
107
+ private audio;
108
+ constructor(jsPsych: JsPsych);
109
+ trial(display_element: HTMLElement, trial: TrialType<Info>, on_load: () => void): Promise<unknown>;
110
+ simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
111
+ private simulate_data_only;
112
+ private simulate_visual;
113
+ private create_simulation_data;
114
+ }
115
+ export default AudioKeyboardResponsePlugin;