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

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.

Posts: 12
Registered: ‎06-04-2013
My Device: Z10
My Carrier: Vodafone
Accepted Solution

HTML5 audio simply is not working

[ Edited ]



I have some html5 audio elements placed directly on the markup on the page.


I then trigger these with js to play at certain points in the app.


In all other devices/browsers this is working fine.  In BB10 WebWorks this is not.  It is proving a major stumbling block for delivery on my project.


This is my audio player:


		<audio id="genCorrect" preload="auto">
			<source src="audio/generic-correct.wav" type="audio/wav"></source>
			<source src="audio/generic-correct.mp3" type="audio/mpeg"></source>
			<p>Your browser does not support the audio element</p>

 And this is the code i use to trigger it:



 No sound is playing at all.


My model is Z10


Software release is


Any help would be greatfully received!

Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: HTML5 audio simply is not working

Hi Payso,


I've tried your sample code on the same device/software and the sound is playing for me, so let's see what else it could be:


1. After triggering play(), hit the volume up and down buttons, the now playing dialog should appear, and show the name of the audio file, as well as a play or pause button. If you see the pause button, it indicates that the audio file is playing. What do you see in the now playing dialog after triggering play()?

2. If you copy the file to the device, are you able to play it using the File Manager/Music apps?

3. Is the file local or remote to the WebWorks app?

4. Have you tried other audio files?


If you have a web server (xampp,wamp), try hosting the web page and pointing your BlackBerry 10 Browser to the page and test.


Posts: 12
Registered: ‎06-04-2013
My Device: Z10
My Carrier: Vodafone

Re: HTML5 audio simply is not working

[ Edited ]



After a night's sleep and a fresh pair of eyes it seems there is an issue with two of the sounds.


One does not load and one appears to load but cannot play.


If i set all triggers to the same sound it is fine so will accept that the issue is not with WebWorks but the content i have been supplied with.


All that aside your response was extremely useful as it gave me some debugging ideas that i missed yesterday so thanks.


Is there any preferential bitrate, codec for mp3 for BB10?

Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: HTML5 audio simply is not working

You can find information about supported / preferred media formats here:


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.