soundfont-player icon indicating copy to clipboard operation
soundfont-player copied to clipboard

Can't get soundfont-player to work on Mac (Safari or Chrome)

Open nitzanrh opened this issue 4 years ago • 11 comments

After setting up the player I get this message via the console: Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'ac.decodeAudioData') line 522

Anyone experienced this error and knows how to handle it?

Cheers, Nitzan

nitzanrh avatar Aug 31 '20 16:08 nitzanrh

I've just noticed that!

Same issue on Safari, but I can use on Chrome.

Have a look at the gh-page on Safari 14.1.1 on Mac 11.4 https://danigb.github.io/soundfont-player/

Screen Shot 2021-06-16 at 2 14 53 pm

leocaseiro avatar Jun 16 '21 04:06 leocaseiro

This might be a problem introduced with Safari 15. I'm also getting the EncodingError: Decoding failed and DecodeAudioData error. https://discussions.apple.com/thread/253182102 https://lzomedia.com/blog/safari-15-fails-to-decode-audio-data-that-previous-versions-decoded-without-problems/

Right now, i can't get audio on iOS/Safari to work. It works in Chrome and Firefox on a Macbook (same code obviously).

I even created and resumed the AudioContext right on a user click (which apparently you should do for Safari), but that didn't change anything.

Apparently you may have to use 2 different user clicks to first load audio data, then play it back: https://github.com/mdn/webaudio-examples/issues/5#issuecomment-664278053

sschmidTU avatar Oct 20 '21 15:10 sschmidTU

@sschmidTU confirmed as Safari bug on 10.15 in https://bugs.webkit.org/show_bug.cgi?id=230974

hmoffatt avatar Nov 14 '21 23:11 hmoffatt

Any updates on this problem? It's still not working for us on Safari 15.4 and it's a major problem. Did anyone find any solution for it?

marian-simonca avatar Jul 14 '22 13:07 marian-simonca

Did anyone find any solution for it?

Upgrade macOS - that same Safari version works on 11+. Or use another browser.

hmoffatt avatar Jul 14 '22 13:07 hmoffatt

macOS version is 12.3.1. Also, another browser won't help me since this is an application used by lots of users. We can't tell them 'use another browser' just like this. Thank you anyway!

marian-simonca avatar Jul 14 '22 14:07 marian-simonca

Hi all! Here's a temporary solution you could request your users perform. image If they allow all auto play then the playback works no probelm

kishansripada avatar Jul 18 '22 18:07 kishansripada

I would like to ask, has this problem been solved after so long

AlanPaine avatar Mar 08 '23 01:03 AlanPaine

This repository will be archived very soon. I'm not working anymore on it (since a long time). A possible alternative could be https://github.com/danigb/smplr that works on Safari (but have much less options)

danigb avatar Mar 19 '23 11:03 danigb

@sschmidTU Hello, sschmidTU soundfont - player cannot play in Safari can question whether you can use https://github.com/danigb/smplr to replace soundfont - player before osmd use lead to the problems

AlanPaine avatar Mar 20 '23 02:03 AlanPaine

This repository will be archived very soon. I'm not working anymore on it (since a long time). A possible alternative could be https://github.com/danigb/smplr that works on Safari (but have much less options)

@danigb It looks great. Thank you

AlanPaine avatar Mar 20 '23 02:03 AlanPaine