WebAudio Playback: AudioContext currenttime is always 0 on some mobile devices

208 views
Skip to first unread message

Jon Grant

unread,
Feb 23, 2015, 5:30:16 PM2/23/15
to fla...@googlegroups.com
After moving to Flambe 4, WebAudio context currenttime is staying at 0 on iOS.  

iPad iOS 6
Chrome - No Audio
Safari - Audio after touch evert

iPad iOS8
Chrome - No Audio
Safari - No Audio

Kindle fire - Audio
iPod Touch 5 with iOS 7 - Audio

Any ideas?

Jon Grant

unread,
Feb 24, 2015, 3:01:35 PM2/24/15
to fla...@googlegroups.com
Fixed!

The problem was the iPad restriction on playing sounds until a user input plays a sound.  WE have buttons that have click sounds, but for this project we hadn't put them in yet.  Once I added a click sound everything was back to normal.

I also had to add @:keep to button subclasses to keep DCE from removing my constructors.

In the end, I have our applications now fire a silent (actually a file with no audio, not a sound at zero volume - the sound must have a non-zero volume!)  sound on the first user mouse down.  Voila!  Audio on the iPad

mcsha...@gmail.com

unread,
Aug 14, 2015, 12:35:14 PM8/14/15
to Flambe
Thank you for posting the solution, Jon! This saved me a lot of time.
Reply all
Reply to author
Forward
0 new messages