Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

not working in Safari #28

Closed
hmoffatt opened this issue Jun 27, 2016 · 10 comments
Closed

not working in Safari #28

hmoffatt opened this issue Jun 27, 2016 · 10 comments

Comments

@hmoffatt
Copy link

I don't get any sound from the demos (either examples/index.html, nor the page at https://danigb.github.io/soundfont-player/ ) in Safari, either on the Mac or on iOS 9.3.2.

Firstly Safari uses the deprecated name webkitAudioContext. Once I changed that, I still don't get any sound from the soundfont-player page; it seems the soundfont loaded .then() promise is never called. I couldn't see why,

@danigb
Copy link
Owner

danigb commented Jun 27, 2016

This is big! I'll take a look asap. Thanks!

On Mon, Jun 27, 2016 at 9:14 AM, hmoffatt notifications@github.com wrote:

I don't get any sound from the demos (either examples/index.html, nor the
page at https://danigb.github.io/soundfont-player/ ) in Safari, either on
the Mac or on iOS 9.3.2.

Firstly Safari uses the deprecated name webkitAudioContext. Once I changed
that, I still don't get any sound from the soundfont-player page; it seems
the soundfont loaded .then() promise is never called. I couldn't see why,


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#28, or mute the thread
https://github.com/notifications/unsubscribe/AAAdITg2DuhhXB4JBupZpitZFMwfSkCrks5qP3g8gaJpZM4I-0No
.

@danigb
Copy link
Owner

danigb commented Jun 27, 2016

Hi, I've updated marimba.js example to use webkitAudioContext and it works in my machine using OS X and Safari 9.0.2. Do you mind to test in your computer?

(You'll need beefy installed: npm i -g beefy and then beefy examples/marimba.js and open http://127.0.0.1:9966)

Thanks

@hmoffatt
Copy link
Author

hmoffatt commented Jun 28, 2016

Yes, that works for me now. Thanks.

I'd like to test it on iOS too, but Safari on iOS doesn't allow pages to
automatically start playing, only on some user event like clicking a button.

Hamish

@hmoffatt
Copy link
Author

hmoffatt commented Jun 28, 2016

ios.patch.txt

Here is a small demo patch to the marimba.js example so that it plays on
click of a button, meaning it will make sound on iOS.

@smcnally
Copy link
Contributor

Having this issue on iOS (Safari and Chrome) even with triggered sound events (vs onload).

Safari iOS error is

Can't find variable: AudioContext

Installed beefy, but getting errors running examples/marimba.js

Error: Could not find a suitable bundler!

Happy to help troubleshoot MIDI and soundfont playing on iOS vs my issues with beefy.

@laven2
Copy link

laven2 commented Jul 17, 2018

Up, i have similar problem in ios

.then() promise is never called
how to fix it?

@BoOz
Copy link

BoOz commented Jul 17, 2018

Hello,

I had sound in safari by adding first

	// AudioContext support
	var AudioContext = window.AudioContext // Default
	|| window.webkitAudioContext // Safari and old versions of Chrome

@laven2
Copy link

laven2 commented Jul 19, 2018

@BoOz Thnx, but it not working for me
I added the context, but it was suspended
I did it AudioContext.resume() and context was launched
after that I initialize instrument and still do not get into then()

@hmoffatt
Copy link
Author

hmoffatt commented Jul 19, 2018 via email

@danigb
Copy link
Owner

danigb commented Jul 19, 2018

I think this issue is outside the scope of this project. Probably it would be nice to have a note about it in the README (PR is welcomed).

I'll close the issue, but feel free to reopen in you think we should take some action from within the library.

@danigb danigb closed this as completed Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants