This commit is contained in:
Becky Gilbert 2020-10-26 17:02:34 -07:00
commit f16c9a54ee
6 changed files with 12 additions and 3 deletions

View File

@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
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.
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).

View File

@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
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).
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.

View File

@ -8,7 +8,7 @@ Parameters with a default value of *undefined* must be specified. Other paramete
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).
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.

View File

@ -148,6 +148,9 @@ jsPsych.plugins["video-button-response"] = (function() {
}
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
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+'">';
}
}

View File

@ -129,6 +129,9 @@ jsPsych.plugins["video-keyboard-response"] = (function() {
}
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
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+'">';
}
}

View File

@ -171,6 +171,9 @@ jsPsych.plugins["video-slider-response"] = (function() {
}
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
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+'">';
}
}