Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » How can I play a sound file?
How can I play a sound file? [message #920759] Sun, 23 September 2012 12:08 Go to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
EDT 0.8.1

I have a wav file that I'd like to play in my RUI client application when a certain event occurs.

How do you play wav files?

Richard
Re: How can I play a sound file? [message #921858 is a reply to message #920759] Mon, 24 September 2012 13:51 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian SvihovecFriend
Messages: 55
Registered: July 2009
Member
Richard,

EDT does not provide any default support for playing sound files within a Rich UI application.

I found the following link on the general topic of using sound in an HTML application, which might be useful - http://www.w3schools.com/html/html_sounds.asp

If you find an approach that suits your needs, you should be able to write an External Type to add this support to your EGL application.

-Brian
Re: How can I play a sound file? [message #922261 is a reply to message #921858] Mon, 24 September 2012 22:05 Go to previous message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Brian,

Thanks for the pointer. That gave me the start I needed and it was actually easier to get something working than I was expecting.

Within my event function I instantiated a html widget as follows and this played my wav file, which I'd previously imported into my webcontent/audio folder.

playme HTML{ text="<audio src=\"audio\\intro.wav\" autoplay preload=\"auto\" autobuffer></audio>" };


There's still some more work to do though as this works fine in chrome but not in firefox and I need to test the browser support for different audio capabilities and formats. I'll also need to make sure I destroy my instantiated widget.

There's some interesting stuff here that I'll start working through.

It looks like it's time to learn javascript.

Richard
Previous Topic:Record Field Annotations
Next Topic:Default schema is not used by iSeries DB2 connection profile
Goto Forum:
  


Current Time: Sun Oct 13 04:40:27 GMT 2024

Powered by FUDForum. Page generated in 0.03690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top