Audio experiments on iOS #956
-
Hello everybody, first of all, i found jspsych to be an incredible useful tool and i am currently using it to design a PASAT-like experiment (i.e. listening to numbers and clicking on their images) that we want to run online so people could participate from various devices (computer/phone/tablet). I've set up an example on cognition.run: https://ucc5bdlzs4.cognition.run/ and you can find the source code below. I am using jspsych 6.1 image-button-response and audio-button-response plugins. It works on all systems I have tested so far (windows, macOS, android). However, on iOS-devices (iPhones/iPad), it doesn't. After a while of showing a non-progressing loading bar, an "The experiment failed to load" error-message appears. I also tried it on chrome on my iPhone, but nothing changed. Currently the media files are uploaded to formr and accessible to everybody. I have also tried a version where I access the media files from my google drive, with the results remaining the same. Any ideas on what might be the problem? Thank you very much in advance! /* create timeline */
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @maxblomberg Have you tried uploading the files to cognition.run? I suspect there is some kind of CORS issue on iOS. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! I know that this discussion is pretty much resolved, but I'd like to add a doubt regarding running experiments on iOS. At first, I had the issue of not loading the audios at all in iOS devices. To solve that, I added the text below at the beginning of the code: // preload audios This seemed to work, the audios loaded and the experiment moved on, but there was no sound at all playing... I can't seem to solve this problem. I have to basically identical experiments running through Cognition, the difference being the language (one is in Brazilian Portuguese and the other one is in English). Both of them can be found below. On the BP version, I could add use_webaudio: true but that did nothing to solve the problem. On the English version, the experiment failed, running only if I used use_webaudio: false . I am using this platform for the first time and I am programming these experiments for the first time as well. Any ideas on this issue? // preload audios
// preload audios
|
Beta Was this translation helpful? Give feedback.
Hi @maxblomberg
Have you tried uploading the files to cognition.run? I suspect there is some kind of CORS issue on iOS.