Hi,
Using gwt-voices-2.1.8 and GWT 2.4.0. I have 2 problems.
1.
I've created a resource:
@Source("sounds/ringin.wav")
DataResource bell();
then use it as:
String s = Resources.INSTANCE.bell().getSafeUri().asString();
SoundController soundController = new SoundController();
Sound sound =
soundController.createSound(Sound.MIME_TYPE_AUDIO_WAV_UNKNOWN, s); //
plays sound ??
sound.play(); // plays sound OK
When I call SoundController.createSound() the sound plays, which I
suspect it should not. Using Sound.play() works as it should. Is there
a way to stop the sound being played when it is first loaded ?
2.
If I don't use a resource,
String s = GWT.getHostPageBaseURL() + "sounds/ringin.wav";
SoundController soundController = new SoundController();
Sound sound =
soundController.createSound(Sound.MIME_TYPE_AUDIO_WAV_UNKNOWN, s); //
no sound
sound.play(); // no sound
If I type the URL returned by GWT.getHostPageBaseURL() + "sounds/
ringin.wav" into the browser, the sound plays, so I know the file
location is correct.
Any ideas why this doesn't work.
Thanks.