Hi,
I am trying to create an experiment where participants watch a video lecture. At random points during the video lecture, participants will be provided with a prompt (slider component) that they need to respond to.
When these prompts appear I would like to pause the video lecture (movie component) and remove it from the screen. Once participants have responded to the prompt I would then like the lecture to reappear and resume from the point that it was paused.
I have been able to pause and resume the video using the pause() and play() methods. However, I am having difficulty in figuring out how to do this whilst also removing/showing the video lecture.
Initially, I tried creating separate routines. The first routine played the video lecture up until the point at which the first probe appeared and then moved to the probe screen (see code below).
if (t == probeTime) {
// pause the video
segment1.pause();
// move to the probe screen
continueRoutine = false;
}
After the probe routine I then created another routine in the hope that I would be able to resume the video in this new routine. However, when I use segment1.play() in this new routine it just starts the video from the beginning. I am assuming this is because the progress of the video is not saved/shared across routines.
I am just wondering if anyone is able to offer some insight/s into how best to approach this issue. Apologies for the lengthy post.