If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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

Native Development

Reply
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA
Accepted Solution

MediaPlayer Error

Am I doing something wrong here? I am copying the example and get the error:

 

'class bb::multimedia::MediaPlayer' has no member named 'setSource'

 

MediaPlayer mp(this);
	    mp.setSource("/path/to/media.mp3");
	    mp.play();

 Any ideas why it has no member named setSource? I autocomplete on mp. and it has setSoruce their.

 

I'm also including:

 

#include<bb/multimedia/MediaPlayer>

using namespace bb::multimedia;

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: MediaPlayer Error

In R6, to use the MediaPlayer API, all of the following libraries were required to be linked: lbbmultimedia, lmmrndclient, lstrm, and lasound.
For R9, the following library is sufficient: lbbmultimedia.

https://developer.blackberry.com/cascades/documentation/dev/upgrading/platformchanges.html
Please use plain text.