Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Stop a video playback with a keypress and record reaction time

edited September 2017 in OpenSesame

In my experiment, the user watches a video and presses a key (let's say "space") when he sees a specific object.
At the key press, the video stops.
I then need to record the time between the beginning of the video and the time he pressed the key.
How can I do that?
Thank you for your help.


  • Hi Emphyrio,

    The start time of the video is automatically recorded as time_[name of item]. So, if we assume that your media_player_mpy item is simply called media_player_mpy, then you could determine the response time by inserting a simple inline_script directly after the media player, with the following code in the Run phase:

    var.response_time = clock.time() - var.time_media_player_mpy

    Does that make sense?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • Hi Sebastiaan,

    Yes, it does. I still have to make some tests, but it seems to work.
    Thank you very much!


Sign In or Register to comment.