I want to play videos on the iPad via Pavlovia.
However, I get this error message:
NotAllowedError: The request is not allowed by the user agent or
the platform in the current context, possibly because the user denied permission.
I presume this has to do with the issue that no button is pressed and the video is autoplaying.
Do you know any workaround to this problem?
I thought that one solution could be to halt the video until a finger touches the screen, but I failed so far in implementing this using code (I used video.pause(); in the begin routine tab, but the video is not pausing at all).
I tried what you suggested and added a instruction routine requiring that the subject touches the screen to continue.
Unfortunately, this does not solve the problem. The error message is still displayed.
The problem does only occur with apple mobile devices, not with the MacBook.
I have now tried several things to solve this issue.
I created a button (called button) and a mouse component (called mouse_2) using builder in psychopy.
In the movie component in builder, I added this code in the “Start” field (setting this to “Condition”): mouse_2.isPressedIn(button).
Good news: The video will start only after I have pressed the button with the mouse, when running it online on a desktop computer (Pavlovia).
However, I still get the error message when running it on an iPhone or iPad (see attached).
This is really a pity.
I have also muted the movie (No audio) and made its size smaller, because of this information:
Does someone have a suggestion for a solution to this problem, if possible quite soon because we scheduled some experiments at the beginning of next week?