Skip to content

Conversation

ps91
Copy link

@ps91 ps91 commented May 17, 2017

The unlock function wasn't working and after some research I found this solution:

https://paulbakaus.com/tutorials/html5/web-audio-on-ios/

Just changed the source.start(0) to source.noteOn(0) and it worked.

The unlock function wasn't working and after some research I found this solution:

https://paulbakaus.com/tutorials/html5/web-audio-on-ios/

Just changed the `source.start(0)` to `source.noteOn(0)` and it worked.
@phoboslab
Copy link
Owner

phoboslab commented May 17, 2017

.noteOn() is deprecated. iOS 10.1.1 supports .start().

@ps91
Copy link
Author

ps91 commented May 17, 2017

The devices I tested the noteOn() worked but the start() won't work. What should be the best approach then?

@phoboslab
Copy link
Owner

phoboslab commented May 17, 2017

Updating the devices? :)

Or use a polyfill:

if (source.start) {
	source.start(0);
}
else {
	source.noteOn(0);
}

I won't merge this, though, sorry.

@ps91
Copy link
Author

ps91 commented May 17, 2017

No everyone updates their devices (or even can't update), we should be careful and make the library more compatible. Thanks for the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants