Study works on chrome but not safari

Blockquote

URL of experiment: AT-TT [PsychoPy]

Description of the problem: The study runs perfect online on chrome and offline but the following error pops up on Safari.

Hi Anwar! Try converting the WAV file to an MP3; that’s likely to solve your issue

Thanks so much @thomas_pronk. I changed the the file to mp3. Now I get this error. If you have any insights, I’d appreciate it!

Not sure what this error is about. I tried to reproduce it on MacOS X Cataline with Safari 13.1, but there it worked out. Which version of MacOS X and Safari did you get this error on?

Really? It’s a relief to know its not Safari (perhaps) but the version number. I have Safari Version 14.0.

@thomas_pronk I get the same error on Safari 14.0, @anwarzid something must have changed with the latest version, please leave with us to investigate a bit more. Are you happy giving me developer access to your repo? Here to help, thanks, s.

Thank you @sotiri. Yes, I have given you developer access. There are two experiments (one called tt-at and at-tt) I gave you access to both. They are the same thing. I just couldn’t figure out how to counterbalance online so I created two experiments instead.

Perfect, no problem, thanks, more soon, x

Hey @anwarzid, OK, while a permanent fix is on the way, I made some changes to my fork, which you can copy over to your repo to make it work on Safari. Please note that on top of those library edits, Safari only likes mp3 files. Hope that helps some. Please let me know if you need more support. Thanks for your patience, x

Thank you @sotiri. I clicked the link and indeed it works on Safari. I wanted access to the changes you made, however, the hyperlink “to my fork” brings me to a 404 error page. I would appreciate your insights as to how to get these changes to my projects (at-tt) and (tt-at) as I am still modifying them.

No problem @anwarzid, sorry about the 404, project visibility is set to private and cannot be changed for some reason so I gave you developer access instead. Has that worked?

Getting past this problem was a case of upgrading Tone.js and editing PsychoJS to give Safari the user action trigger it needed to allow for audio playback.

The tricky part is including those changes in your project. My preferred way is to create a custom-lib directory to host the updated PsychoJS, x

1 Like

@sotiri Thank you for your help. I ended up recreating the project as the error messages persisted. I added the code you suggested in the index.html file and custom-lib folder; however, participants seem to only hear sound only through computer speakers and not when they have earphones on. Do you have any insights as to why this is? (developer access is granted)

No problem, you’re welcome @anwarzid :blush: OK I tried running both AT-TT and at-tt-new locally on my machine and was unable to reproduce the problem. Could it be something else like their earphones being not properly patched in?

Hi,

Good to see this is on people’s radar-- any idea when the fix will be implemented? I have had the same thing happen when I tested my own experiment out on Safari on Mac (Catalina). It works fine on Firefox, my main browser.

We’re currently getting the same “Tone.js” error message which seems to be specific to iOS. One researcher has found that it happens on an iPhone 11 Pro (Software version 14.0.1) and iPhone XR (14.0.1). Both for Safari and Chrome and playing small MP3 files.

I’m yet to try the work around fixes to see if this circumvents it for now.

Will Tone.js eventually get fixed centrally across the board and be available to those who are having to fix on 2020.1.3 for example? (Each year we have to fix on a particular version for our lab studies and upgrade on a yearly basis for stability).

I am also having the same issue with “Tone.js” in Safari, IOS Version 14.0 (15610.1.28.1.9, 15610).

Dear @aisa2, @fgasking, @tlan, I believe the latest version of PsychoJS now running on Pavlovia includes the relevant fix, please let me know if the issue remains, thanks, x

1 Like

Thanks Sotiri. We are having to fix on PsychoPy 2020 v1.3 for the academic year (which we do every year for stability) - will the fixes be within the libraries linked in the generated code? (i.e. with the old paths)

Hi @fgasking, good point, while the JS import paths should be the same for any 2020.2.x PsychoPy generated HTML export, you do need an ‘index.html’ created starting 2020.2.5. Would you be happy sharing an example project, so I can propose workarounds if need be? Thanks, s.

Thanks Sotiri - ultimately it means that each time you’d update the Builder script and do an export, you’d have to update the html file generated. This is pretty much what we’re doing already for the core fixes i’m applying. Basically copying a set of core fixes into the resources folder, referencing in the JS file and then updating index.html to update to a different version of tone.js.

We’ll probably keep doing this for now, and then hopefully by next year (when we upgrade) - the core fixes and manual updates won’t be required.