exception on play() of wav

41 views
Skip to first unread message

Rori Stumpf

unread,
Nov 15, 2011, 11:34:43 AM11/15/11
to gwt-voices
Is anyone else seeing this exception on play of wav?

createSound(Sound.MIME_TYPE_AUDIO_WAV_PCM, soundUrl);
exception ==> com.google.gwt.core.client.JavaScriptException:
(TypeError): Cannot read property 'duration' of null

Environment:
-- GWT 2.4.0, latest.
-- gwt-voices 2.1.4.
-- User Agent (Google Chrome v 15.0.874.120 m)
-- Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like
Gecko) Chrome/15.0.874.120 Safari/535.2

Does not happen with IE9.

Eflite

unread,
Nov 16, 2011, 10:23:40 AM11/16/11
to gwt-voices
Yes, I can't seem to get it to work, I keep getting the same
exception:

com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot
read property 'duration' of null

My code:
Sound sound =
soundController.createSound(Sound.MIME_TYPE_AUDIO_MPEG_MP3, "sounds/
siren.mp3");
sound.play();

Envirtonment:
-- GWT 2.4.0
-- gwt-voices 2.1.4.
-- Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko)
Chrome/15.0.874.120 Safari/535.2

Can anybody suggest a work-around for this?

Cheers,
Eflite

Rori Stumpf

unread,
Nov 16, 2011, 12:24:12 PM11/16/11
to gwt-voices
I was going to write a fix for it, but was missing some dependency in
the project, so gave up on that.
Basically, the JSNI code is attempting to use a variable called
'duration', that has not been set.

Rori Stumpf

unread,
Nov 16, 2011, 5:13:46 PM11/16/11
to gwt-voices
Reply all
Reply to author
Forward
0 new messages