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

Java Development

Reply
New Developer
Posts: 43
Registered: ‎05-12-2009
My Device: Not Specified

lanscape video play

Hi Dear All,

                  I want to play my video in landscape mode only.Can any one suggest me how will i go proceed ?

I know only 4.7 can has this support.I used following code but till its playing in portrait mode only Smiley Sad.

 

  *********************************
            InputStream is = getClass().getResourceAsStream("/BlackBerry.mp4");
            player = javax.microedition.media.Manager.createPlayer(is, "video/mp4");
            player.addPlayerListener(this);           
            player.realize();     

            net.rim.device.api.ui.UiEngineInstance uii = Ui.getUiEngineInstance();
            uii.setAcceptableDirections(Display.DIRECTION_LANDSCAPE);
           
            VideoControl vc = (VideoControl) _player.getControl("VideoControl");
            if (vc != null)
            {
                _videoField = (Field) vc.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                vc.setVisible(true);
                net.rim.device.api.ui.Manager mn = _videoField.getManager();
                vc.setDisplayFullScreen(true);     

            } 
            player.start();
*****************

 

ajay jawale

Singapore

Highlighted
Moderator
Posts: 465
Registered: ‎12-18-2008
My Device: Not Specified
Contributor
Posts: 22
Registered: ‎08-10-2010
My Device: 9550

Re: lanscape video play

tnx MohA but the link is showing Access denied.........