Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlock audio in Iphone/Ipad devices #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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