@jspsych/plugin-video-keyboard-response 1.1.2 → 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,200 +1,200 @@
1
- import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
- declare const info: {
3
- readonly name: "video-keyboard-response";
4
- readonly parameters: {
5
- /** Array of the video file(s) to play. Video can be provided in multiple file formats for better cross-browser support. */
6
- readonly stimulus: {
7
- readonly type: ParameterType.VIDEO;
8
- readonly pretty_name: "Video";
9
- readonly default: any;
10
- readonly array: true;
11
- };
12
- /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
13
- readonly choices: {
14
- readonly type: ParameterType.KEYS;
15
- readonly pretty_name: "Choices";
16
- readonly default: "ALL_KEYS";
17
- };
18
- /** Any content here will be displayed below the stimulus. */
19
- readonly prompt: {
20
- readonly type: ParameterType.HTML_STRING;
21
- readonly pretty_name: "Prompt";
22
- readonly default: any;
23
- };
24
- /** The width of the video in pixels. */
25
- readonly width: {
26
- readonly type: ParameterType.INT;
27
- readonly pretty_name: "Width";
28
- readonly default: "";
29
- };
30
- /** The height of the video display in pixels. */
31
- readonly height: {
32
- readonly type: ParameterType.INT;
33
- readonly pretty_name: "Height";
34
- readonly default: "";
35
- };
36
- /** If true, the video will begin playing as soon as it has loaded. */
37
- readonly autoplay: {
38
- readonly type: ParameterType.BOOL;
39
- readonly pretty_name: "Autoplay";
40
- readonly default: true;
41
- };
42
- /** If true, the subject will be able to pause the video or move the playback to any point in the video. */
43
- readonly controls: {
44
- readonly type: ParameterType.BOOL;
45
- readonly pretty_name: "Controls";
46
- readonly default: false;
47
- };
48
- /** Time to start the clip. If null (default), video will start at the beginning of the file. */
49
- readonly start: {
50
- readonly type: ParameterType.FLOAT;
51
- readonly pretty_name: "Start";
52
- readonly default: any;
53
- };
54
- /** Time to stop the clip. If null (default), video will stop at the end of the file. */
55
- readonly stop: {
56
- readonly type: ParameterType.FLOAT;
57
- readonly pretty_name: "Stop";
58
- readonly default: any;
59
- };
60
- /** The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. */
61
- readonly rate: {
62
- readonly type: ParameterType.FLOAT;
63
- readonly pretty_name: "Rate";
64
- readonly default: 1;
65
- };
66
- /** If true, the trial will end immediately after the video finishes playing. */
67
- readonly trial_ends_after_video: {
68
- readonly type: ParameterType.BOOL;
69
- readonly pretty_name: "End trial after video finishes";
70
- readonly default: false;
71
- };
72
- /** How long to show trial before it ends. */
73
- readonly trial_duration: {
74
- readonly type: ParameterType.INT;
75
- readonly pretty_name: "Trial duration";
76
- readonly default: any;
77
- };
78
- /** If true, the trial will end when subject makes a response. */
79
- readonly response_ends_trial: {
80
- readonly type: ParameterType.BOOL;
81
- readonly pretty_name: "Response ends trial";
82
- readonly default: true;
83
- };
84
- /** If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a response is accepted. */
85
- readonly response_allowed_while_playing: {
86
- readonly type: ParameterType.BOOL;
87
- readonly pretty_name: "Response allowed while playing";
88
- readonly default: true;
89
- };
90
- };
91
- };
92
- declare type Info = typeof info;
93
- /**
94
- * **video-keyboard-response**
95
- *
96
- * jsPsych plugin for playing a video file and getting a keyboard response
97
- *
98
- * @author Josh de Leeuw
99
- * @see {@link https://www.jspsych.org/plugins/jspsych-video-keyboard-response/ video-keyboard-response plugin documentation on jspsych.org}
100
- */
101
- declare class VideoKeyboardResponsePlugin implements JsPsychPlugin<Info> {
102
- private jsPsych;
103
- static info: {
104
- readonly name: "video-keyboard-response";
105
- readonly parameters: {
106
- /** Array of the video file(s) to play. Video can be provided in multiple file formats for better cross-browser support. */
107
- readonly stimulus: {
108
- readonly type: ParameterType.VIDEO;
109
- readonly pretty_name: "Video";
110
- readonly default: any;
111
- readonly array: true;
112
- };
113
- /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
114
- readonly choices: {
115
- readonly type: ParameterType.KEYS;
116
- readonly pretty_name: "Choices";
117
- readonly default: "ALL_KEYS";
118
- };
119
- /** Any content here will be displayed below the stimulus. */
120
- readonly prompt: {
121
- readonly type: ParameterType.HTML_STRING;
122
- readonly pretty_name: "Prompt";
123
- readonly default: any;
124
- };
125
- /** The width of the video in pixels. */
126
- readonly width: {
127
- readonly type: ParameterType.INT;
128
- readonly pretty_name: "Width";
129
- readonly default: "";
130
- };
131
- /** The height of the video display in pixels. */
132
- readonly height: {
133
- readonly type: ParameterType.INT;
134
- readonly pretty_name: "Height";
135
- readonly default: "";
136
- };
137
- /** If true, the video will begin playing as soon as it has loaded. */
138
- readonly autoplay: {
139
- readonly type: ParameterType.BOOL;
140
- readonly pretty_name: "Autoplay";
141
- readonly default: true;
142
- };
143
- /** If true, the subject will be able to pause the video or move the playback to any point in the video. */
144
- readonly controls: {
145
- readonly type: ParameterType.BOOL;
146
- readonly pretty_name: "Controls";
147
- readonly default: false;
148
- };
149
- /** Time to start the clip. If null (default), video will start at the beginning of the file. */
150
- readonly start: {
151
- readonly type: ParameterType.FLOAT;
152
- readonly pretty_name: "Start";
153
- readonly default: any;
154
- };
155
- /** Time to stop the clip. If null (default), video will stop at the end of the file. */
156
- readonly stop: {
157
- readonly type: ParameterType.FLOAT;
158
- readonly pretty_name: "Stop";
159
- readonly default: any;
160
- };
161
- /** The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. */
162
- readonly rate: {
163
- readonly type: ParameterType.FLOAT;
164
- readonly pretty_name: "Rate";
165
- readonly default: 1;
166
- };
167
- /** If true, the trial will end immediately after the video finishes playing. */
168
- readonly trial_ends_after_video: {
169
- readonly type: ParameterType.BOOL;
170
- readonly pretty_name: "End trial after video finishes";
171
- readonly default: false;
172
- };
173
- /** How long to show trial before it ends. */
174
- readonly trial_duration: {
175
- readonly type: ParameterType.INT;
176
- readonly pretty_name: "Trial duration";
177
- readonly default: any;
178
- };
179
- /** If true, the trial will end when subject makes a response. */
180
- readonly response_ends_trial: {
181
- readonly type: ParameterType.BOOL;
182
- readonly pretty_name: "Response ends trial";
183
- readonly default: true;
184
- };
185
- /** If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a response is accepted. */
186
- readonly response_allowed_while_playing: {
187
- readonly type: ParameterType.BOOL;
188
- readonly pretty_name: "Response allowed while playing";
189
- readonly default: true;
190
- };
191
- };
192
- };
193
- constructor(jsPsych: JsPsych);
194
- trial(display_element: HTMLElement, trial: TrialType<Info>): void;
195
- simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
196
- private simulate_data_only;
197
- private simulate_visual;
198
- private create_simulation_data;
199
- }
200
- export default VideoKeyboardResponsePlugin;
1
+ import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
+ declare const info: {
3
+ readonly name: "video-keyboard-response";
4
+ readonly parameters: {
5
+ /** Array of the video file(s) to play. Video can be provided in multiple file formats for better cross-browser support. */
6
+ readonly stimulus: {
7
+ readonly type: ParameterType.VIDEO;
8
+ readonly pretty_name: "Video";
9
+ readonly default: any;
10
+ readonly array: true;
11
+ };
12
+ /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
13
+ readonly choices: {
14
+ readonly type: ParameterType.KEYS;
15
+ readonly pretty_name: "Choices";
16
+ readonly default: "ALL_KEYS";
17
+ };
18
+ /** Any content here will be displayed below the stimulus. */
19
+ readonly prompt: {
20
+ readonly type: ParameterType.HTML_STRING;
21
+ readonly pretty_name: "Prompt";
22
+ readonly default: any;
23
+ };
24
+ /** The width of the video in pixels. */
25
+ readonly width: {
26
+ readonly type: ParameterType.INT;
27
+ readonly pretty_name: "Width";
28
+ readonly default: "";
29
+ };
30
+ /** The height of the video display in pixels. */
31
+ readonly height: {
32
+ readonly type: ParameterType.INT;
33
+ readonly pretty_name: "Height";
34
+ readonly default: "";
35
+ };
36
+ /** If true, the video will begin playing as soon as it has loaded. */
37
+ readonly autoplay: {
38
+ readonly type: ParameterType.BOOL;
39
+ readonly pretty_name: "Autoplay";
40
+ readonly default: true;
41
+ };
42
+ /** If true, the subject will be able to pause the video or move the playback to any point in the video. */
43
+ readonly controls: {
44
+ readonly type: ParameterType.BOOL;
45
+ readonly pretty_name: "Controls";
46
+ readonly default: false;
47
+ };
48
+ /** Time to start the clip. If null (default), video will start at the beginning of the file. */
49
+ readonly start: {
50
+ readonly type: ParameterType.FLOAT;
51
+ readonly pretty_name: "Start";
52
+ readonly default: any;
53
+ };
54
+ /** Time to stop the clip. If null (default), video will stop at the end of the file. */
55
+ readonly stop: {
56
+ readonly type: ParameterType.FLOAT;
57
+ readonly pretty_name: "Stop";
58
+ readonly default: any;
59
+ };
60
+ /** The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. */
61
+ readonly rate: {
62
+ readonly type: ParameterType.FLOAT;
63
+ readonly pretty_name: "Rate";
64
+ readonly default: 1;
65
+ };
66
+ /** If true, the trial will end immediately after the video finishes playing. */
67
+ readonly trial_ends_after_video: {
68
+ readonly type: ParameterType.BOOL;
69
+ readonly pretty_name: "End trial after video finishes";
70
+ readonly default: false;
71
+ };
72
+ /** How long to show trial before it ends. */
73
+ readonly trial_duration: {
74
+ readonly type: ParameterType.INT;
75
+ readonly pretty_name: "Trial duration";
76
+ readonly default: any;
77
+ };
78
+ /** If true, the trial will end when subject makes a response. */
79
+ readonly response_ends_trial: {
80
+ readonly type: ParameterType.BOOL;
81
+ readonly pretty_name: "Response ends trial";
82
+ readonly default: true;
83
+ };
84
+ /** If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a response is accepted. */
85
+ readonly response_allowed_while_playing: {
86
+ readonly type: ParameterType.BOOL;
87
+ readonly pretty_name: "Response allowed while playing";
88
+ readonly default: true;
89
+ };
90
+ };
91
+ };
92
+ type Info = typeof info;
93
+ /**
94
+ * **video-keyboard-response**
95
+ *
96
+ * jsPsych plugin for playing a video file and getting a keyboard response
97
+ *
98
+ * @author Josh de Leeuw
99
+ * @see {@link https://www.jspsych.org/plugins/jspsych-video-keyboard-response/ video-keyboard-response plugin documentation on jspsych.org}
100
+ */
101
+ declare class VideoKeyboardResponsePlugin implements JsPsychPlugin<Info> {
102
+ private jsPsych;
103
+ static info: {
104
+ readonly name: "video-keyboard-response";
105
+ readonly parameters: {
106
+ /** Array of the video file(s) to play. Video can be provided in multiple file formats for better cross-browser support. */
107
+ readonly stimulus: {
108
+ readonly type: ParameterType.VIDEO;
109
+ readonly pretty_name: "Video";
110
+ readonly default: any;
111
+ readonly array: true;
112
+ };
113
+ /** Array containing the key(s) the subject is allowed to press to respond to the stimulus. */
114
+ readonly choices: {
115
+ readonly type: ParameterType.KEYS;
116
+ readonly pretty_name: "Choices";
117
+ readonly default: "ALL_KEYS";
118
+ };
119
+ /** Any content here will be displayed below the stimulus. */
120
+ readonly prompt: {
121
+ readonly type: ParameterType.HTML_STRING;
122
+ readonly pretty_name: "Prompt";
123
+ readonly default: any;
124
+ };
125
+ /** The width of the video in pixels. */
126
+ readonly width: {
127
+ readonly type: ParameterType.INT;
128
+ readonly pretty_name: "Width";
129
+ readonly default: "";
130
+ };
131
+ /** The height of the video display in pixels. */
132
+ readonly height: {
133
+ readonly type: ParameterType.INT;
134
+ readonly pretty_name: "Height";
135
+ readonly default: "";
136
+ };
137
+ /** If true, the video will begin playing as soon as it has loaded. */
138
+ readonly autoplay: {
139
+ readonly type: ParameterType.BOOL;
140
+ readonly pretty_name: "Autoplay";
141
+ readonly default: true;
142
+ };
143
+ /** If true, the subject will be able to pause the video or move the playback to any point in the video. */
144
+ readonly controls: {
145
+ readonly type: ParameterType.BOOL;
146
+ readonly pretty_name: "Controls";
147
+ readonly default: false;
148
+ };
149
+ /** Time to start the clip. If null (default), video will start at the beginning of the file. */
150
+ readonly start: {
151
+ readonly type: ParameterType.FLOAT;
152
+ readonly pretty_name: "Start";
153
+ readonly default: any;
154
+ };
155
+ /** Time to stop the clip. If null (default), video will stop at the end of the file. */
156
+ readonly stop: {
157
+ readonly type: ParameterType.FLOAT;
158
+ readonly pretty_name: "Stop";
159
+ readonly default: any;
160
+ };
161
+ /** The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. */
162
+ readonly rate: {
163
+ readonly type: ParameterType.FLOAT;
164
+ readonly pretty_name: "Rate";
165
+ readonly default: 1;
166
+ };
167
+ /** If true, the trial will end immediately after the video finishes playing. */
168
+ readonly trial_ends_after_video: {
169
+ readonly type: ParameterType.BOOL;
170
+ readonly pretty_name: "End trial after video finishes";
171
+ readonly default: false;
172
+ };
173
+ /** How long to show trial before it ends. */
174
+ readonly trial_duration: {
175
+ readonly type: ParameterType.INT;
176
+ readonly pretty_name: "Trial duration";
177
+ readonly default: any;
178
+ };
179
+ /** If true, the trial will end when subject makes a response. */
180
+ readonly response_ends_trial: {
181
+ readonly type: ParameterType.BOOL;
182
+ readonly pretty_name: "Response ends trial";
183
+ readonly default: true;
184
+ };
185
+ /** If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a response is accepted. */
186
+ readonly response_allowed_while_playing: {
187
+ readonly type: ParameterType.BOOL;
188
+ readonly pretty_name: "Response allowed while playing";
189
+ readonly default: true;
190
+ };
191
+ };
192
+ };
193
+ constructor(jsPsych: JsPsych);
194
+ trial(display_element: HTMLElement, trial: TrialType<Info>): void;
195
+ simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
196
+ private simulate_data_only;
197
+ private simulate_visual;
198
+ private create_simulation_data;
199
+ }
200
+ export default VideoKeyboardResponsePlugin;