problem playing audio on ipad

PennController for IBEX Forums Support problem playing audio on ipad

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by Avatar camRoRo 2 weeks, 1 day ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7353
    Avatar
    camRoRo
    Participant

    Hi,

    I’m really struggling to get my experiment to play audio on an Ipad. Here is a link to the experiment:

    https://farm.pcibex.net/r/ukGKJf/

    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!

    #7354
    Jeremy
    Jeremy
    Keymaster

    Hi,

    If the AddHost method 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 .txt extension (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.”)

    The AWS console has an option to set up CORS for your S3 bucket, you need to allow GET requests for https://farm.pcibex.net

    Jeremy

    #7355
    Avatar
    camRoRo
    Participant

    Hi Jeremy,

    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!

    #7357
    Jeremy
    Jeremy
    Keymaster

    Hi,

    I was able to run (a copy of) your experiment on Safari on an iPhone, but I used the AddHost method and needed to add a Button and wait for a click on it before playing the Audio element. The images load fine, but because play crashes in the absence of a Button element, the script would never get to their print commands, which is why you didn’t see them

    Another issue (at least with the AddHost method) 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?

    Jeremy

    #7359
    Avatar
    camRoRo
    Participant

    Hey Jeremy,

    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!

    Camilo

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.