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

Regular Contributor
Posts: 55
Registered: ‎09-01-2010
My Device: Not Specified

Blackberry video with text display problem

I need a video screen and under the video play, I want to show two lines of text like below.




For that I am using following code.


public final class PlayVideoScreen extends MainScreen {
    private Player player;
    private VideoControl videoControl;

    public PlayVideoScreen() {

        // ms.setTitle(new LabelField("Let's play some video..."));
        LabelField lf = new LabelField("Video Play");
        try {
            // Create a new Player pointing to the video file.
            // This can use any valid URL.
            player = javax.microedition.media.Manager

            // Create a new VideoControl.
            videoControl = (VideoControl) player.getControl("VideoControl");
            // Initialize the video mode using a Field.
            Field videoField = (Field) videoControl.initDisplayMode(

            VolumeControl volume = (VolumeControl) player


            // Set the video control to be visible.
            // videoControl.setVisible(true);
        } catch (MediaException me) {
        } catch (IOException ioe) {


         LabelField lf2 = new LabelField("How r you?");


    public boolean onClose() {
        // Clean up the player resources.
        return true;


Now what is may be the height of video, the view is taking scroll and the text is only visible after scrolling. I am using a device of screen size 320X240px. I have even test with a video of 320X150px. But the text is not visible without scrolling, although there is lots of free space above and bottom of the video. What is problem in my code? How to solve it?

Posts: 74
Registered: ‎07-22-2008
My Device: BlackBerry Z10
My Carrier: N/A

Re: Blackberry video with text display problem

Can you try scalling the VideoControl by calling setDisplaySize(320,150)?  Please see the below KB article for more details. 





Pratik Sapra
Gaming & Apps Consultant
Developer Relations