October 7, 2021 at 10:55 am #7353
I’m really struggling to get my experiment to play audio on an Ipad. Here is a link to the experiment:
If I use the PennController.AddHost() command to load my pictures and audio files from my server, the experiment works perfectly on PC and mac, but not on an Ipad (tried on Safari, chrome and firefox).
I tried using the PreloadZip() command, following the instructions I found here, but doing it like this doesn’t load the resources at all (tried it both with my private server and creating an aws bucket following the instructions, made sure that the zip file is public, the .htaccess file is also public and in the same folder).
What am I doing wrong? Would really appreciate some pointers, thanks a lot in advance!October 7, 2021 at 12:14 pm #7354JeremyKeymaster
AddHostmethod works for everything but the Ipad, I would just go with it. It also means that the problem is not coming from where the files are retrieved from (given that they are successfully fetched on PC and Mac) so switching to using a zip file is unlikely to solve the Ipad issue.
Unfortunately I don’t have access to an Ipad myself, so I cannot test your project to troubleshoot this problem. What happens exactly on the Ipad? Do you get a preloading message, and when you start the trial, you have blank spaces instead of images, and no audio playback?
Re. the zip issue, you need to set the CORS properly. I see on your private server that you have a file named
.htaccess.txt, but it needs to be named
.htaccess, without the
.txtextension (documentation page, step 1: “If your editor or operating system does not allow you to give this name to your file, name it htaccess.txt: you will rename it later after uploading it on your server”; step 4: “If you could not use this filename before (due to your operating system’s settings for instance) rename your file .htaccess.”)
JeremyOctober 7, 2021 at 2:15 pm #7355
ah thanks for the help! So I now also got the PreloadZip() method to work on pc and mac by setting up CORS for the S3 bucket, but neither of the methods works on ios. It shows an empty screen instead of the pictures and doesn’t play the audio file (just like you guessed). It’s really frustrating because when I try out the experiment from this forum post on my ipad, it works perfectly and plays audio just fine!
I am planning to take the ipad to some kindergartens and run the experiment with children, so I really have to get it to work on a tablet. Worst case scenario I’ll try out an android tablet I guess. Is there no known ios workaround for playing audio?
Thanks again!October 7, 2021 at 4:49 pm #7357JeremyKeymaster
I was able to run (a copy of) your experiment on Safari on an iPhone, but I used the
AddHostmethod and needed to add a Button and
waitfor a click on it before
playing the Audio element. The images load fine, but because
playcrashes in the absence of a Button element, the script would never get to their
Another issue (at least with the
AddHostmethod) is that you don’t have a file named
008vismeghvitkanin.wav: you file is named
008vismeghvitkanin.m4a(different extension—I didn’t check the actual audio format of the file)
Did you say you tried Chrome on your iPad too? Did it also block playback the same way?
JeremyOctober 8, 2021 at 5:46 am #7359
the trick with the button works perfectly, thanks for the tip! Without the button it didn’t work on chrome, safari or firefox on the ipad. Also If I add a fullscreen() command, it only works on Safari (really weird). But this will totally do!
As a sidenote, using PCIbex for Ipad (i.e. touchscreen) experiments is SO MUCH better than trying to programm an app or use some other software (IMHO). So thank you guys so much for doing god’s work with PCIbex, it’s awesome!
- You must be logged in to reply to this topic.