Playing videos of different lengths on MWorks

Sachi Sanghavi's Avatar

Sachi Sanghavi

23 Apr, 2021 08:34 PM

Hi Chris,

I have some clips (mp4 files) of different lengths that Iā€™d like to use as my RSVP stimuli. Is there a way to either read the length of a clip, or to automatically move on to the next task state when the video stops playing?

So far, all my videos have had fixed lengths so it was straightforward.

Thanks in advance!


  1. Support Staff 1 Posted by Christopher Sta... on 23 Apr, 2021 08:38 PM

    Christopher Stawarz's Avatar

    Hi Sachi,

    If you assign a variable to the ended parameter, you can use it to know when each video ends. Please see the attached example.


  2. 2 Posted by Sachi Sanghavi on 26 Apr, 2021 02:50 PM

    Sachi Sanghavi's Avatar

    Hi Chris,

    This is helpful ā€” works as I want. Thank you so much!


  3. Christopher Stawarz closed this discussion on 26 Apr, 2021 04:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ā†© Submit the comment

You can use Command āŒ˜ instead of Control ^ on Mac