Is it possible to play a sound notification using Google Web Toolkit which will be translated to Javascript? Thanks.
Since GWT 2.2 you can play audio with: com.google.gwt.media.client.Audio
class.
API: http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/media/client/Audio.html
Sample:
private Audio mistakeAudio;
{
mistakeAudio = Audio.createIfSupported();
mistakeAudio.setSrc("style/failure.wav");
}
public void mistakeSound(){
mistakeAudio.play();
}
Try using this library: http://code.google.com/p/gwt-voices/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With