You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins/video-button-response.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,12 @@ Parameter | Type | Default Value | Description
15
15
stimulus | array | *undefined* | An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.
16
16
choices | array of strings | *undefined* | Labels for the buttons. Each different string in the array will generate a different button.
17
17
button_html | function | ``(choice: string, choice_index: number)=>`<button class="jspsych-btn">${choice}</button>``; | A function that generates the HTML for each button in the `choices` array. The function gets the string and index of the item in the `choices` array and should return valid HTML. If you want to use different markup for each button, you can do that by using a conditional on either parameter. The default parameter returns a button element with the text label of the choice.
18
-
button_layout | string | 'grid' | Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.
18
+
button_layout | string | `'grid'` | Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.
19
19
grid_rows | number | 1 | The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.
20
20
grid_columns | number | null | The number of columns in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of columns will be determined automatically based on the number of buttons and the number of rows.
21
21
prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).
22
-
width | numeric | width of the video file | The width of the video display in pixels.
23
-
height | numeric | heigh of the video file | The height of the video display in pixels.
22
+
width | numeric | width of the video file | The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified.
23
+
height | numeric | heigh of the video file | The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified.
24
24
autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded.
25
25
controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video.
26
26
start | numeric | null | If given a value, the video will start at this time point in seconds.
| stimulus | array |*undefined*| An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference. |
16
16
| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). |
17
-
| width | numeric | width of the video file | The width of the video display in pixels. |
18
-
| height | numeric | heigh of the video file | The height of the video display in pixels. |
17
+
| width | numeric | width of the video file | The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified. |
18
+
| height | numeric | heigh of the video file | The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified. |
19
19
| autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded. |
20
20
| controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video. |
21
21
| start | numeric | null | If given a value, the video will start at this time point in seconds. |
Copy file name to clipboardExpand all lines: docs/plugins/video-slider-response.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,16 +14,16 @@ Parameter | Type | Default Value | Description
14
14
----------|------|---------------|------------
15
15
stimulus | array | *undefined* | An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.
16
16
prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).
17
-
width | numeric | width of the video file | The width of the video display in pixels.
18
-
height | numeric | heigh of the video file | The height of the video display in pixels.
17
+
width | numeric | width of the video file | The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified.
18
+
height | numeric | height of the video file | The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified.
19
19
autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded.
20
20
controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video.
21
21
start | numeric | null | If given a value, the video will start at this time point in seconds.
22
-
stop| numeric | null | If given a value, the video will stop at this time point in seconds.
22
+
stop| numeric | null | If given a value, the video will stop at this time point in seconds.
23
23
rate | numeric | null | The playback rate of the video. 1 is normal, <1 is slower, >1 is faster.
24
24
min | integer | 0 | Sets the minimum value of the slider.
25
25
max | integer | 100 | Sets the maximum value of the slider.
26
-
slider_start | integer | 50 | Sets the starting value of the slider
26
+
slider_start | integer | 50 | Sets the starting value of the slider.
27
27
step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change.
28
28
labels | array of strings | [] | Labels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width.
29
29
slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.
prompt: '<p>Click the emoji that best represents your reaction to the video</p><p>Click a button to end the trial.</p><p>Response buttons are disabled for the first 2 seconds of playing.</p>',
0 commit comments