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

Reply
Developer
decibell
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...
Please use plain text.
Developer
shawnblais
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 sound:smileyfrustrated:ound = 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 :smileytongue:

Please use plain text.
Developer
decibell
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...
Please use plain text.
Developer
kefayati
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. :smileywink:

---------------------
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.
----------------------
Please use plain text.