mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 16:48:12 +00:00
Merge branch 'master' of https://github.com/jspsych/jsPsych
This commit is contained in:
commit
f16c9a54ee
@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
|
|||||||
|
|
||||||
Parameter | Type | Default Value | Description
|
Parameter | Type | Default Value | Description
|
||||||
----------|------|---------------|------------
|
----------|------|---------------|------------
|
||||||
sources | 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 player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.
|
sources | 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.
|
||||||
choices | array of strings | [] | Labels for the buttons. Each different string in the array will generate a different button.
|
choices | array of strings | [] | Labels for the buttons. Each different string in the array will generate a different button.
|
||||||
button_html | HTML string | `'<button class="jspsych-btn">%choice%</button>'` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on.
|
button_html | HTML string | `'<button class="jspsych-btn">%choice%</button>'` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on.
|
||||||
margin_vertical | string | '0px' | Vertical margin of the button(s).
|
margin_vertical | string | '0px' | Vertical margin of the button(s).
|
||||||
|
@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
|
|||||||
|
|
||||||
Parameter | Type | Default Value | Description
|
Parameter | Type | Default Value | Description
|
||||||
----------|------|---------------|------------
|
----------|------|---------------|------------
|
||||||
sources | 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 player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.
|
sources | 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.
|
||||||
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 subject is supposed to take (e.g., which key to press).
|
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 subject is supposed to take (e.g., which key to press).
|
||||||
width | numeric | width of the video file | The width of the video display in pixels.
|
width | numeric | width of the video file | The width of the video display in pixels.
|
||||||
height | numeric | heigh of the video file | The height of the video display in pixels.
|
height | numeric | heigh of the video file | The height of the video display in pixels.
|
||||||
|
@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
|
|||||||
|
|
||||||
Parameter | Type | Default Value | Description
|
Parameter | Type | Default Value | Description
|
||||||
----------|------|---------------|------------
|
----------|------|---------------|------------
|
||||||
sources | 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 player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.
|
sources | 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.
|
||||||
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 subject is supposed to take (e.g., which key to press).
|
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 subject is supposed to take (e.g., which key to press).
|
||||||
width | numeric | width of the video file | The width of the video display in pixels.
|
width | numeric | width of the video file | The width of the video display in pixels.
|
||||||
height | numeric | heigh of the video file | The height of the video display in pixels.
|
height | numeric | heigh of the video file | The height of the video display in pixels.
|
||||||
|
@ -148,6 +148,9 @@ jsPsych.plugins["video-button-response"] = (function() {
|
|||||||
}
|
}
|
||||||
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
||||||
type = type.toLowerCase();
|
type = type.toLowerCase();
|
||||||
|
if (type == "mov") {
|
||||||
|
console.warn('Warning: video-button-response plugin does not reliably support .mov files.')
|
||||||
|
}
|
||||||
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,9 @@ jsPsych.plugins["video-keyboard-response"] = (function() {
|
|||||||
}
|
}
|
||||||
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
||||||
type = type.toLowerCase();
|
type = type.toLowerCase();
|
||||||
|
if (type == "mov") {
|
||||||
|
console.warn('Warning: video-keyboard-response plugin does not reliably support .mov files.')
|
||||||
|
}
|
||||||
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,9 @@ jsPsych.plugins["video-slider-response"] = (function() {
|
|||||||
}
|
}
|
||||||
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
|
||||||
type = type.toLowerCase();
|
type = type.toLowerCase();
|
||||||
|
if (type == "mov") {
|
||||||
|
console.warn('Warning: video-slider-response plugin does not reliably support .mov files.')
|
||||||
|
}
|
||||||
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user