Skip to content

Unlock audio in Iphone/Ipad devices#162

Open
ps91 wants to merge 1 commit into
phoboslab:masterfrom
ps91:patch-1
Open

Unlock audio in Iphone/Ipad devices#162
ps91 wants to merge 1 commit into
phoboslab:masterfrom
ps91:patch-1

Conversation

@ps91

@ps91 ps91 commented May 17, 2017

Copy link
Copy Markdown

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

phoboslab commented May 17, 2017

Copy link
Copy Markdown
Owner

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

@ps91

ps91 commented May 17, 2017

Copy link
Copy Markdown
Author

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

@phoboslab

phoboslab commented May 17, 2017

Copy link
Copy Markdown
Owner

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

ps91 commented May 17, 2017

Copy link
Copy Markdown
Author

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