Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
kwichman
Posts: 11
Registered: ‎12-30-2009
My Carrier: T-Mobile

How to play midi/mp3 in a widget

I want to play a midi or mp3 sound as background music in a widget.

I tried to use <object> to embed the music. In the simulator I get a java null pointer exception

but then it is playing the sound. On the device it is not playing any sound at all.

 

Any ideas ?

 

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,702
Registered: ‎10-16-2008
My Carrier: Rogers

Re: How to play midi/mp3 in a widget

There really isn't a good way to do this in either the BlackBerry Browser or in a BlackBerry Widget.  We are working on an Audio API that will allow you to do exactly what you are asking for, but it has not yet been released.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
New Developer
hp3
Posts: 32
Registered: ‎10-07-2009

Re: How to play midi/mp3 in a widget

Tim, can you provide more information about the Audio api since OS 6 is now announced?  Were you referring to HTML 5 audio or is there more functionality that RIM will be offering?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,702
Registered: ‎10-16-2008
My Carrier: Rogers

Re: How to play midi/mp3 in a widget

You can use the HTML5 audio tags in BB6.... but we are also providing an audio API to be able to play, pause etc audio files using a JavaScript API that will work both on BB6 and OS 5.0

 

These should be released somewhere near the DevCon timeframe.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
New Developer
hp3
Posts: 32
Registered: ‎10-07-2009

Re: How to play midi/mp3 in a widget

is there any documentation  online about the audio api?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,702
Registered: ‎10-16-2008
My Carrier: Rogers

Re: How to play midi/mp3 in a widget

You can find it here:

 

http://www.blackberry.com/developers/docs/widgetapi/

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
New Developer
hp3
Posts: 32
Registered: ‎10-07-2009

Re: How to play midi/mp3 in a widget

thanks.

 

are there any limitations as to how the Blackberry widget plug-in for Eclipse handles sound playback compared to an actual device?

Please use plain text.