danigb/soundfont-player

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

Opened this issue · 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

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

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:
mdn/webaudio-examples#5 (comment)

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?

Did anyone find any solution for it?

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

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!

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

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

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)

@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

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