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.
You might be able to work around it by setting autoPlay = False at the start of the routine until a play button is pressed and using Chrome instead of Safari.
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?
I can’t remember the thread you are referring to. What was it specifically?
I found a solution for most of the problem I encountered with my past programs.
hello @Christian_Leukel , I mean related to playing the video on iPad , did you find a solution for it ? im trying to run experiment online , but I keep getting the same error message on Safari and Chrome.
best
Ali
Yes, I did.
I added a routine before, asking subjects to press a button in oder to start the video, and I turned off the sound.
Further, I think it helped to turn everything that concerns multitouch and media control off in the systems settings.