mp3 resources - can they be played from within GWT?

212 views
Skip to first unread message

jones34

unread,
Oct 6, 2012, 8:59:00 PM10/6/12
to google-we...@googlegroups.com
Is there any way (a widget, maybe) I can play an MP3 that I have as gwt resource, without leaving gwt or sending the user to a new browser tab?  An MP3 player widget, maybe?

thanks

Sebastián Gurin

unread,
Oct 7, 2012, 2:18:32 PM10/7/12
to google-we...@googlegroups.com
Perhaps something like http://code.google.com/p/gwt-sound/

Chris Lercher

unread,
Oct 7, 2012, 2:57:35 PM10/7/12
to google-we...@googlegroups.com
Yes, GWT includes an Audio class: http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/media/client/Audio.html

However, not all browsers support all formats, e.g. Firefox doesn't support mp3: http://en.wikipedia.org/wiki/HTML5_Audio
So you may have to serve the file in multiple formats. More background on HTML5 audio: http://html5doctor.com/html5-audio-the-state-of-play/

Jens

unread,
Oct 7, 2012, 6:34:14 PM10/7/12
to google-we...@googlegroups.com
Check out gwt-voices.

-- J.
Reply all
Reply to author
Forward
0 new messages