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

Java Development

New Developer
Posts: 6
Registered: ‎11-25-2008
My Device: Not Specified

Embedded Media 4.2.1

Hello, I'm getting an error in the 4.2.1 when I try to create a new media player with the following code:


player = Manager.createPlayer(currentMedia.getFilePath()); player.realize();VideoControl videoControl = (VideoControl) player.getControl("VideoControl"); if (videoControl != null) { videoField = (Field) videoControl.initDisplayMode( VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field"); videoControl.setDisplaySize(thisScreen.getWidth(),(int) (thisScreen.getMainManager().getHeight())); videoControl.setVisible(true); }





It tells me that GUI Primitive mode is not supported. Is this only supported in 4.3 and above? And if so, is there anyway to use the NATIVE_VIDEO and a canvas in a RIM UI App (i.e. not a midlet)




BlackBerry Development Advisor
Posts: 15,693
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Embedded Media 4.2.1

Support for a video field embedded in a BlackBerry CLDC application was added in BlackBerry handheld software version 4.3.0. 


How To - Play video within a BlackBerry smartphone application
Article Number: DB-00641



For version 4.2.1 it can be displayed by launching the built in player or played within a MIDlet on a Canvas.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker