Video Stimulus¶
A video stimulus plays a video clip.
Required Properties¶
type¶
content¶
- Definition: A pointer to the underlying resource
- Possible values: Must be the file name of the video file (you will be prompted to upload the video file)
- Format support is dependent upon the participant's browser. See Tips tab for further information.
- mp4 (encoded with the h.264-x264 codec) tends to work well across our supported browsers and all major operating systems (Windows, Mac, and Linux). However, there is a chance that older Linux systems with older browsers will not support this format.
- For video transcoding, we recommend using the free, open-source program Handbrake.
Optional Properties¶
autoplay¶
- Definition: Whether or not to start playing the video without participant action
- Possible values:
true
orfalse
- Default:
true
- Setting this option to
false
nullifies the delay parameter. - This parameter affects the video when used as a choice response as well.
barrier¶
- Definition: If set to
true
, all subsequent stimuli and responses will not be displayed until this video clip finishes playing - Possible values:
true
orfalse
- Default:
true
In trials using the above stimulus code, other stimuli and responses will be displayed at the same time as the video.
In trials using the above stimulus code, the video will play before other stimuli and responses are displayed. This code is equivalent to code where the barrier property is not specified.
In trials using the above stimulus code, the video will play before other stimuli and responses are displayed. This code is equivalent to code where the barrier property is not specified.
delay¶
Info
This property is used for presenting multiple stimuli on a trial in a sequence. To implement inter-trial intervals, see the delay parameter in trial templates instead.
Warning
The delaying of multiple stimuli on a trial does NOT have a chain effect. That is, the delay of any stimulus on a trial is always relative to the onset of that trial or the end of the last stimulus acting as a barrier.
- Definition: Delay the onset of a stimulus by a certain number of seconds, relative to (1) the onset of a trial if there are no stimuli acting as barriers or (2) the end of the last stimulus acting as a barrier.
- Possible values: A number in seconds (decimals are supported)
- Default:
0
(no delay)
The above code introduces a delay of 1600 milliseconds.
- This property is optional but recommended for an video stimulus. If not set, the video may appear to start abruptly on a new trial.
parent¶
- Definition: If specified, then the properties of the specified stimulus will be inherited by this stimulus, unless a property of the same name is defined in this stimulus
- Possible values: The name of another defined stimulus
Here, the video1 stimulus inherits the delay and replayable properties of video0. video1 does not inherit the width property of video0 because the stimulus definition of video1 has its own specified width property.
replayable¶
visible¶
width¶
- Definition: The width of the video, specified in pixels
- Possible values: A number of pixels (e.g.
"200px"
) - Default: The actual size of the video
- Height will be automatically adjusted to preserve the original aspect ratio.
- This parameter affects the video when used as a choice response as well.