Want to add sound effects to your GWT apps?
The gwt-voices project has long provided a simple API for adding sound to your GWT apps, which can be useful for business applications and games alike.
To date, gwt-voices provided audio support via the browser's native capabilities (remember the BGSOUND tag and its friends?) and, if installed, Adobe Flash (for MP3 files).
This latest version of gwt-voices adds automatic support for HTML5 audio for modern browsers. Of course, the old native audio and Flash fallback functionality is still in place in case your users need it.
To get started, add the gwt-voices jar to your project's classpath and inherit the gwt-voices module:
<inherits name="com.allen_sauer.gwt.voices.gwt-voices" />
Then simply play() your sound:
SoundController sc = new SoundController();
Sound sound = sc.createSound(Sound.MIME_TYPE_AUDIO_OGG_VORBIS,
"mysoundfile.ogg"); // put the file in the 'war' directory
The main project site, which includes a live demo, is here:http://code.g oogle.com/p/gwt-voices/
Interested in seeing which MIME Types are supported by the various HTML5 capable browsers? Look no further than this crowd sourced data (your own user agent will be highlighted in yellow):
Full set of Release Notes:
A more complete Getting Started guide:
Feedback is always welcome.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.