Freezing movies in Pavlovia and the TypeError: this.movie is undefined

I have an experiment with several very short clips. However, when I test the online experiment at some point the videos do not start and all the following videos also do not start. It is not always the same video which freezes by the way. I read that I should do the following.

Write into the Begin Routine tab write:

nameOfMyMovie.reset();
nameOfMyMovie.play();

and write into the End Routine tab.

nameOfMyMovie.stop();

Instead of “nameOfMyMovie” I put the name of my video component. However, if I put this code into my code component I get the following error:

TypeError: this.movie is undefined

The videos are read off a .csv file if this is important.

Any help is much appreciated! :slightly_smiling_face:

Addendum

I noticed this repeatedly: I get different error messanges on my laptop versus my smartphone with the same experiment. On my phone the error says:

TypeError: Cannot read properties of undefined (reading 'play')

The meaning of these error messages is probably the same :sweat_smile:

I don’t think you can have movieComponent.play() in Begin Routine of a routine containing movieComponent.

Try setting the start time at 1 second (or even 10 seconds to debug the issue) to give the movie time to load.

Thanks for your reply wakecarter! Besides movieComponent.play(), movieComponent.reset(), movieComponent.stop(), movieComponent.seek() were recommend, but all result in errors.

(Videos are not played multiple times in Pavlovia)
(Video stimuli not resetting to beginning in online experiment - #10 by Samantha_Gregory)

I removed the code and set the starting time to 1 second. On the smartphone the videos are still freezing, but it works on my laptop with the following twist: At some point the screen starts flickering.

One solution I can try is to split the experiment in two parts, i.e., give the participants a short break.

(Note for completeness: My video files are very small and very short. I have 53 of them and I added them as additional resources using the experiment properties).

What version of PsychoPy are you using?

PsychoPy v2023.2.3

I’m not sure if it will help but it might be worth seeing what happens if you set the version to 2022.2.5.

Unfortunately, still the same freezing effect :smiling_face_with_tear:

Hi There, just to check - what size are your movies, have you tried reducing the size of them/compressing them? does that help at all? (this is incase it is a memory error)

Thanks,
Becca