PennController for IBEX › Forums › Support › Many audio stimuli in Safari
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by abraver.
-
AuthorPosts
-
September 18, 2020 at 4:44 am #6127abraverParticipant
I have an audio ABX experiment running with no issues in Chrome:
https://expt.pcibex.net/ibexexps/abraver/Tyler2/experiment.htmlHowever I’m having issues in Safari, both on desktop and on mobile, which seems to be related to preloading of the audio files.
There are two main blocks, each of which reads from a csv file stim1.csv / stim2.csv to find a list of audio files hosted remotely (http://aaronbraver.com/experiments/tyler1/audio/)
In Safari, the first page of the experiment will load, but the browser freezes or (or at least gets very slow) when trying to fill in the fields on that page. On the attempts where the first page isn’t completely frozen, I can get to a trial that should load some audio, but it gets stuck on preloading.
The debugger shows no errors, and the only things that come up in the JavaScript console are the expected 404s as it tries to find the audio files locally first.
My guess is that this has something to do with preloading because if I modify the stim1/stim csv files to list, say, 1/4 as many stimuli, everything loads nicely. I haven’t found the exact number of stimuli that causes things to go wrong, but in total there are 72 items * 2 blocks, plus 3 practice items, each wav file being about 300kb, putting the total somewhere just shy of 50mb.
Any suggestions would be appreciated.
September 18, 2020 at 1:14 pm #6128JeremyKeymasterHello,
Unfortunately this is a known problem with Safari, which consecutive releases of PennController try to address with more or less (emphasis on less) success…
I’ll try to rethink the preloading method again for the next release, but in the meantime you should definitely package your audio files in one or several zip archives—you shouldn’t have any problem with that since you’re already hosting your resources on a dedicated server. Follow this guide for instructions, and don’t hesitate to ask any questions you might have
Jeremy
September 18, 2020 at 4:02 pm #6129abraverParticipantThanks! Unfortunately the server is running Nginx (and that’s not something I can change). I don’t suppose you have the config for Nginx, do you? I’m playing with it at the moment and haven’t had success yet.
September 18, 2020 at 4:10 pm #6130abraverParticipantI gave up on myself too soon! The following works for me, in case anyone else has an Nginx server:
location ~* /experiments { add_header 'Access-Control-Allow-Origin' 'https://expt.pcibex.net'; add_header 'Access-Control-Allow-Methods' 'GET'; add_header 'Access-Control-Allow-Headers' 'X-Accept-Charset,X-Accept,Content-Type'; }
-
AuthorPosts
- You must be logged in to reply to this topic.