MovieStim

visual MovieStim

Movie Stimulus.

Constructor

new MovieStim(options, movie)

Source:
To Do:
  • autoPlay does not work for the moment.
Parameters:
Name Type Attributes Default Description
options Object
Properties
Name Type Description
name String

the name used when logging messages from this stimulus

win module:core.Window

the associated Window

movie string | HTMLVideoElement | module:visual.Camera

the name of a movie resource or of a HTMLVideoElement or of a Camera component

options.units string <optional>
"norm"

the units of the stimulus (e.g. for size, position, vertices)

options.pos Array.<number> <optional>
[0, 0]

the position of the center of the stimulus

options.units string <optional>
'norm'

the units of the stimulus vertices, size and position

options.ori number <optional>
0.0

the orientation (in degrees)

options.size number <optional>

the size of the rendered image (the size of the image will be used if size is not specified)

options.color Color <optional>
Color('white')

the background color

options.opacity number <optional>
1.0

the opacity

options.contrast number <optional>
1.0

the contrast

options.interpolate boolean <optional>
false

whether or not the image is interpolated

options.flipHoriz boolean <optional>
false

whether or not to flip horizontally

options.flipVert boolean <optional>
false

whether or not to flip vertically

options.loop boolean <optional>
false

whether or not to loop the movie

options.volume number <optional>
1.0

the volume of the audio track (must be between 0.0 and 1.0)

options.noAudio boolean <optional>
false

whether or not to play the audio

options.autoPlay boolean <optional>
true

whether or not to autoplay the video

options.autoDraw boolean <optional>
false

whether or not the stimulus should be automatically drawn on every frame flip

options.autoLog boolean <optional>
false

whether or not to log

Extends

  • VisualStim

Methods

(protected) _estimateBoundingBox()

Source:

Estimate the bounding box.

(protected) _getDisplaySize() → {Array.<number>}

Source:

Get the size of the display image, which is either that of the ImageStim or that of the image it contains.

Returns:

the size of the displayed image

Type
Array.<number>

(protected) _updateIfNeeded()

Source:

Update the stimulus, if necessary.

pause(logopt)

Source:

Pause the movie.

Parameters:
Name Type Attributes Default Description
log boolean <optional>
false

whether of not to log

play(logopt)

Source:

Start playing the movie.

Parameters:
Name Type Attributes Default Description
log boolean <optional>
false

whether of not to log

reset(logopt)

Source:

Reset the stimulus.

Parameters:
Name Type Attributes Default Description
log boolean <optional>
false

whether of not to log

seek(timePoint, logopt)

Source:

Jump to a specific timepoint

Note: seek is experimental and does not work on all browsers at the moment.

Parameters:
Name Type Attributes Default Description
timePoint number

the timepoint to which to jump (in second)

log boolean <optional>
false

whether of not to log

setMovie(movie, logopt)

Source:

Setter for the movie attribute.

Parameters:
Name Type Attributes Default Description
movie string | HTMLVideoElement | module:visual.Camera

the name of a movie resource or of a HTMLVideoElement or of a Camera component

log boolean <optional>
false

whether of not to log

stop(logopt)

Source:

Stop the movie and reset to 0s.

Parameters:
Name Type Attributes Default Description
log boolean <optional>
false

whether of not to log