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

Adobe AIR 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.


Reply
Developer
Posts: 73
Registered: ‎11-16-2010
My Device: Playbook

Re: Playing an Audio File with MediaPlayer

After doing a bunch of debugging and pouring through source I've found that the property inputAttached as part of MediaPlayer, is undefined, meaning, as far as I know, for the time being the Simulator doesn't have any sound support whatsoever, so until that's implemented, or we have actual devices to test, just leave the code there commented. Hopefully RIM can put out a fix soon, I'll probably bring it up on the webcast tomorrow...

----------------------------
Let's turn things up...
Developer
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Playing an Audio File with MediaPlayer

[ Edited ]

You don't need to use QNX MediaPlayer to play sound... why not just use standard AS3 API's?

 

var soundSmiley Frustratedound = new Sound();

sound.load(new URLRequest("http://www.site.com/song.mp3"));

sound.play();

 

That should work fine.

 

With that said... the simulator doesn't emit sound... so Smiley Tongue

Developer
Posts: 73
Registered: ‎11-16-2010
My Device: Playbook

Re: Playing an Audio File with MediaPlayer

Haha didn't even think of the basics (still may update it to QNX later on though), thanks shawnblais!

----------------------------
Let's turn things up...
Highlighted
Developer
Posts: 43
Registered: ‎12-22-2010
My Device: Not Specified

Re: Playing an Audio File with MediaPlayer

I tried both way and none work. I should mention though that the undelying sound system on the VM is working since I key click sounds from the virtual keyboard.

The QNX media player class is appearently not eorking at all... I think multiple people have tried it in many ways.

The platform does not support the classical Sound object and non of the stuff I coded work on the VM though they do fine on the desktop.

This is rather dissapointing... they should have guessed many people would spend their holidays coding an app for PB and withough audio, ehh, that would be really boaring. Smiley Wink

---------------------
a) If you like my response/post, please provide a Kudo (white star to the left).
b) If my post solved your problem please click on the Accept as Solution button.
----------------------