Experiment with video clips

Hi everyone,

I'm new to Matlab and Psychtoolbox and I am trying to make an experiment with short video clips as stimuli.

I've already built a program that 1) opens gui for entering participant data, 2) reads in a list of images with associate parameter details, 3) presents image for XX milliseconds, 4) waits for subject key press, 5) repeat until list of images is exhausted, 5) when finished, write to .csv file. The images are presented randomly; no fancy staircases or anything.

I want to run a exactly the same type of experiment but using videos instead of images. Unfortunately, I've discovered that it isn't really as easy as editing a few things on my existing code.

I've got the video demos running, but still pretty lost on how to randomize the videos every time and collect a subject response in between video presentations. If anyone can offer tips or point me to some sample code that does what I'm looking for, I'd greatly appreciate it.

Thanks!