Video is not played but stays static in Pavlovia

URL of experiment: https://pavlovia.org/run/merve73/soa_new/html/
Code: https://gitlab.pavlovia.org/merve73/soa_new/blob/master/html/Soa_New.js

Description of the problem: Hi, I have a video stimulus changing in every repeat. Each time a different one among three is set depending on the name. I have first training trials that contain the video stimulus and then test trials start. Everything works just fine in practice trials. When the test trials start the video comes as it needs to be but just stays static like an image. It does not play. So, there is no problem with choosing the video depending on the name, importing and starting it. However the only problem is not playing the video. Also, I did everything the same in both practice and test trials. I do not know why it works in practice but not in the test part. Btw, everything work fine locally. I constructed the experiment with builder, do not know much about the coding structures behind it. Do you have any idea about the reason?

Thank you!

Hi, Iā€™m not quite sure, but maybe this has something to do with the problems that are explained in this link: Videos are not played multiple times in Pavlovia ?

I hope this might help you!

I had a very similar problem, and my solution was to add a code component below the movie. The example below assumes that your movie component is called myMovie, so simply replace its name with the name of yours. For example, the code components could have a Begin Routine tab value of myMovie.play(), and an End Routine tab value of myMovie.stop() with myMovie.seek(0) on the line below that. The .stop() is optional if the end of the movie also ends the trial, or the movie does not either have or play an audio track. This solution ensures that the movie resumes at its beginning on its next presentation. But has the limitation of starting at the beginning of a trial. Although it is easy to offset the start by adding a routine before, but within the trial loop, that last for the desired delay.

Hi, thank you a lot for both advice. For the ones who face a similar problem better to write it down here. I solved the problem by creating a separate video stimulus. I guess the problem was using the same stimulus in different parts of the experiment somehow. When I was trying to play the video that was played before in the practice part, it was getting stuck in the last frame of the previous play. After creating a different video to be played in the test part it is played without any problems. Yet, now only in Safari all video stimuli including the practice part stays like a picture. I do not know what is there specifically about Safari but I created a different thread for it since it is a new problem now.

Thank you once again :slight_smile:

1 Like