PBS-KIDS / Platypus

2D tile based game framework in HTML5
128 stars 30 forks source link

Mobile Audio #13

Closed pleduc closed 10 years ago

pleduc commented 10 years ago

I read the article about making one single m4a file and playing/pausing from that for sounds on mobile. I'm in alpha development right now and that isn't very practical for my purposes to have a single audio file since things are still in flux, so I was wondering if there was a way I could make the individual ogg/mp3 that I have working in non-mobile browsers work in mobile for now? I've tried playing with the "client-supports" at the bottom of config.json, but eliminating/moving the android and ios devices from m4a doesn't fix the problem, still no audio. Is there away around this?

Thanks, Patrick

probityrules commented 10 years ago

Not really. The only way to use multiple audio files on mobile is to play each of them on a touch event, which is typically impractical for games. We typically hold off on audio altogether for mobiles until the design has solidified enough for us to begin putting the single track together. You might also make a single track with only 2 or 3 audio clips, just to make sure it's loading and playing as you test.

CreateJS does support the new Audio API which may address this issue, but we haven't explored this route in the engine or our games yet (primarily because this isn't supported by a wide variety of mobile devices).

probityrules commented 10 years ago

I've been working on web audio integration if you care to check it out - this doesn't change anything for iOS Safari, but it should let you bypass the single file issue on some browsers like mobile Chrome: https://github.com/PBS-KIDS/Platypus/pull/14