Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
11-05-2010 10:14 AM
I'm using Audio Extension to play sample.mp3 file. This file is stored inside folder [audio] within my app. Here is the code I used and it didn't work
var playerInstance = new blackberry.audio.Player("file///audio/sample.mp3")
I'm not sure if "file:///audio/sample.mp3" is the right path to use because it didn't work on simulator/device. Please help
11-05-2010 12:52 PM
give this a try and post up the results.
var playerInstance = new blackberry.audio.Player("audio/sample.mp3"); playerInstance.play();
If it's packaged with your WebWorks application, I think that may work.
12-19-2010 09:56 PM - edited 12-19-2010 09:58 PM
If you're using files in your widget you'll need to use the local URI and content type.
var playerInstance = new blackberry.audio.Player("local:///mp3/sound2.mp3",
"audio/mpeg", true); playerInstance.play();
First parameter is the URI string (local is relative to your application).
Second is the content-type (see content type example http://www.blackberry.com/developers/docs/widgetap
Third parameter is to use async or not for playback.
That should work! I didn't test audio on simulator, but works on my Bold.