views:

53

answers:

0

Hi all,

I am developing an application which includes streaming of videos form web server. I have tested on Curve 8900, 8330 and the videos stream perfectly and played well. But the problem exist on BOLD 9000. On bold i can only hear sound of videos but no display.

I cant understand how the same code works perfectly on 8900 but not on Bold 9000.My code is like :

    try {
                        player = Manager.createPlayer(source);           //  source is custom data source
                        player.realize();
                       UiApplication.getUiApplication().invokeLater(new Runnable(){
                           public void run() {
                               VideoControl vc = (VideoControl) player.getControl("VideoControl");
                                vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                                GUIControl gc;
                                if ((gc = (GUIControl)player.getControl("GUIControl"))!=null){
                                    ms.insert((Field)gc.initDisplayMode(GUIControl.USE_GUI_PRIMITIVE,null), 0);
                                       ms.deleteRange(1, 1);

                                }

                                vc.setDisplayLocation(0, h.getHeight());

                                try {
                                vc.setDisplaySize(Display.getWidth(), Display.getHeight() - h.getHeight());
                                } catch (Exception e) {

                                    }
                                vc.setVisible(true);                            
                            }

                    });
                       player.addPlayerListener(new MediaPlayerListener());
                        player.start();
                        LoginScreen.volumeControl = (VolumeControl) player.getControl("VolumeControl");

                    } catch (Exception e) {

                    }

    Above code works pefectly on Curve 8900  as i can hear sound as well as see the display of videos..but on BOLD using same code i can only hear the sound but not see the display.