3 ms·
Sigh. No sound. I kindof understand why. If my recent forays into in-browser audio are any indication, it's kindof a mess. You need Flash fallbacks for older v
by wwweston 15y ago
Sigh. No sound.
I kindof understand why. If my recent forays into in-browser audio are any indication, it's kindof a mess. You need Flash fallbacks for older versions of IE, there are latency/seeking problems on browsers that do support the audio element, mobile support is even sketchier and limited to a single element, and that's just for playback of pre-generated media...
- portmanteaufu 15y agoThe documentation briefly mentioned supporting audio assets [1], but I haven't been able to find obvious examples of how to use them once they've been loaded. One of the provided sample games [2] had a soundtrack, so I dug through the source [3] a bit and discovered that there is an "Audio" class and some other undocumented functions that can be used with an "Assets" object to achieve playback. Looks like he's just coding to fast to keep everything written down. :) [1] http://jawsjs.com/docs/symbols/jaws.Assets.html http://jawsjs.com/docs/symbols/jaws.Assets.html [2] http://ippa.se/webgames/unexpected_outcome/ http://ippa.se/webgames/unexpected_outcome/ [3] http://ippa.se/webgames/unexpected_outcome/game.js http://ippa.se/webgames/unexpected_outcome/game.js
- ippa 15y agoHTML5 audio is kind of weaksauce atm yes. To support all major browsers I need to ship both oggs and mp3s for example. Jaws creates instances of Audio() for each sound, loading them by setting the src-attribute and listening for the canplay event before making the asset as fully loaded. Just google the Audio-tag, you have play(), pause() etc.