Dear community,
We are coding an experiment with real-time interactions (e.g. gaze contingent) while playing a video. We intend to perform jumps in the video when certain conditions are met. The difficulty we encountered is, as the continuous playing of the video requires flipping the window each frame, our for-loop for checking for the triggering condition also got limited by the refresh rate. A simple version of our code is as follows:
video.play()
video.autoDraw = True
while core.getTime() < 10:
boolean = check_something()
if boolean:
video.pause()
video.seek(...)
video.play()
win.flip()
We want to run check_something()
as frequently as possible while not interfering with video playback. Any suggestions on how to improve this?
Many thanks in advance!