Millisecond Forums

Interrupting trials

https://forums.millisecond.com/Topic20654.aspx

By Jin - 2/6/2017

Hi all,

I have this task where I want to show a video to a participant and have it proceed automatically to the next trial after the video ends. I also want to put in a key that will  let the experimenter to skip through the video and proceed onto the next screen. I've figured out how to have the video play and proceed automatically, but I can't figure out how to put in a key to skip through the video without video playing all the way through.

<trial Group_AAV>
/ stimulustimes = [0=Group_AAV]
/ branch = [trial.q_NA]
/ responseinterrupt = trial
/ validresponse = ("t")
/ timeout = 4000
/ inputdevice = keyboard
/ pretrialpause = 250
/ posttrialpause = 250
</trial>

Thank you!
By Dave - 2/6/2017

Jin - Monday, February 6, 2017
Hi all,

I have this task where I want to show a video to a participant and have it proceed automatically to the next trial after the video ends. I also want to put in a key that will  let the experimenter to skip through the video and proceed onto the next screen. I've figured out how to have the video play and proceed automatically, but I can't figure out how to put in a key to skip through the video without video playing all the way through.

<trial Group_AAV>
/ stimulustimes = [0=Group_AAV]
/ branch = [trial.q_NA]
/ responseinterrupt = trial
/ validresponse = ("t")
/ timeout = 4000
/ inputdevice = keyboard
/ pretrialpause = 250
/ posttrialpause = 250
</trial>

Thank you!

To have a trial automatically advance after the video is done, you can set the <video> element's /playthrough attribute to true and set the <trial>'s /trialduration or /timeout to some small value.

You can also keep the trial set up like you have now, if that is what you prefer.

> I also want to put in a key that will  let the experimenter to skip through the video and proceed onto the next screen.

This is would only be possible if the "next screen" is in a different <block> than the <trial> that plays the video. In that case, you can skip through the currently running <block> by pressing CTRL+B.

Otherwise, the only thing you can do is set /responseinterrupt to immediate in the <trial> definition you currently have (the <video>'s /playthrough may not be set to true either); then the trial will terminate / advance to the next once you press any of the keys you designated as /validresponse in the trial. You'll want to set the <trial>'s /timeout to the approximate length of the video, such that the trial terminates and advances automatically if no response occurs.