Drag and drop online experiment crashes when using ipad

Found it under view code!!! Not exactly obvious. I’ll let you know when I have given permission.

Alright, thanks, please note, I would need developer rights to access the code

Sotirios,

You are now a guest. The URL is https://pavlovia.org/bartl115/bunnynext
I really appreciate you looking at this for me. Good luck.
Running the experiment should be self explanatory but if you have any questions please ask.
As I said in my post when running it on an IPAD it fails the drag and drop after about 4 or 5 elements.

Phil

OK thanks, could you make it developer access por favor?

Done

Hi Sotiri,

Did you ever get a chance to try running the experiment.
Since my last post I have been having all kinds of problems running experiments on my ipads. Please see the post below for more details. Any help is greatly appreciated.

Phil

Hi @philBartlett, sorry I have been busy working on the new release, I should be able to take a look very soon, thanks, s.

Thanks Sotirios. I really appreciate your help.

Phil

Hi @philBartlett, no problem, alright I tried piloting the study on several iPads and can see there are issues with linking to a really old version of PsychoJS (3.2), which OK should be fairly straighforward to address, but was unable to get to the drag and drop routine. Can I ask which iPad model and which iOS / Safari version you are on please? Thanks, s.

Sotirios,

The latest version of my experiments no longer runs on either of the 2 ipads that I own. The only changes I have made to experiments is to add .wav files.
The ipads I have are:
ipad 8th generation - MYL92VC/A - ios 14.4
ipad 4th generation - MD510C/A - ios 10.3.3

The following posting describes what I have found from my investigations.
https://discourse.psychopy.org/t/experiment-does-not-run-on-my-ipad-but-does-on-another/20167

The latest version of the experiment I gave you access to is:
https://pavlovia.org/bartl115/uofwmemorystudydccs

I have given you developer access to it.

I have seen some posts where there is mention of a support fork. Is that what I need? And what does it do? I have 4 experiments that all have the same problem.

Thanks again.

Phil

Hi @philBartlett, many thanks for all the information, I can tell your project is based on a relatively old version of PsychoJS and would have liked to bring it up to date, but my PsychoPy is struggling to read the .psyexp open on the Mac for some reason!

That said, I was able to narrow the problem down to one of our dependencies used for audio playback, legacy howler.js, complaining about having to deal with .wav files. You could try a different format like .mp3, but I have created a support fork linking in howler.js latest and it seems to be running OK as is?

I’m not sure if this is your issue, but your code is moving items on every frame when the mouse button is clicked, which can cause a memory overload. I would check that the coordinates are different before updating the position (equating x and y separately).

Thanks Sotiri. It does seem to run but there is no sound. Also it takes a while before it allows me to move a object.
Your comment about using mp3 files. I thought you couldn’t use them in psychopy because of licensing issues.

I have 4 experiments which all exhibit the same problem how do I apply your fix to each of them. Also if I make changes in psychopy offline and then re-upload it will it still work.

Thanks Phil

Thanks Wakefield for you reply. I got a response from Sotiri in which he got it to work but you suggestion is a good idea and I will look into implementing it.

Phil

.mp3 files can’t be used offline but are the best format online.

My experiment developed offline on psychopy references sound .wav files. How do I make the online version use .mp3 files easily?

.wav files can work online as well. It’s .ogg files that don’t.

However, what I do is have the filename minus the extension in the Excel file (or whatever) and then use a both component to add the appropriate extension.

Alternatively, if you set a flag early in the experiment (in a Both component, such as useOnline=0 in Python and useOnline=1; in Javascript) then you could add an if statement to either search and replace .wav with .mp3 or add the appropriate extension in an auto code component later.

You’ll need to add the .mp3 files in the resources section of the online tab of experiment settings.

Hi @philBartlett, OK the fix I gave you is available with the latest version of PsychoPy, which was just announced today, have you a reason to not upgrade? x

Personally I’d hold out for 2021.1.1 to catch the first round of bug fixes.

OK in case upgrading is not an option, one would need to edit the default index.html each time ‘Export HTML’ is called to link to the latest version of howler.js, which does support .wav playback

1 Like