danielstern / angular-synthesizer

A Synthesizer for WebAudio with Angular JS
http://danielstern.ca/synthesizer
3 stars 1 forks source link

Does not work on iPhone #1

Open over9001 opened 9 years ago

over9001 commented 9 years ago

I set up a testing host at http://synthpop2.divshot.io/, and when I access it in Safari from iOS 7.0.2 (11a501) on an iPhone 4S, it plays no sound. sadiphone

danielstern commented 9 years ago

@over9001 Sounds good :zap: Looks like this is caused by the current directives listening only for click and not touch. :man: You are assigned to this issue. Please push your development branch regularly so we can identify any potential issues with the code early :put_litter_in_its_place:

over9001 commented 9 years ago

@danielstern getting ngTouch in there is no problem, but there's a gotcha: https://developer.apple.com/library/safari/documentation/audiovideo/conceptual/using_html5_audio_video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html#//apple_ref/doc/uid/TP40009523-CH6-SW1 "Note: On iOS, the Web Audio API requires sounds to be triggered from an explicit user action, such as a tap. Calling noteOn() from an onload event will not play sound."

This is where I have been committing changes: https://github.com/over9001/touch-angular-synthesizer

danielstern commented 9 years ago

See this branch for relevant updates: https://github.com/danielstern/angular-synthesizer/tree/touch