Java me 视频j2me的问题

Java me 视频j2me的问题,java-me,Java Me,我想在j2me中播放一段视频,我使用的代码是 int index = 0; LoadVideo(index); String url = "file:///e:/videos/Abc.3gp"; try{ Player p = Manager.createPlayer(url); p.realize();

我想在j2me中播放一段视频,我使用的代码是

       int index = 0;

         LoadVideo(index);

         String url = "file:///e:/videos/Abc.3gp";

               try{
                        Player p = Manager.createPlayer(url);
                        p.realize();

                        //Get the video controller
                        VideoControl video = (VideoControl) p.getControl("VideoControl");

                        //Get a GUI to display the video
                        Item videoItem = (Item)video.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
                       //videoItem.setPreferredSize(100, 200);
                        //Append the GUI to a form
                       form.append(videoItem);

                       display.setCurrent(form);

                        //Start the video
                        p.start();
               }catch(IOException ioe){ } catch(MediaException me){ }

问题是视频仅在小屏幕模式下播放,如何使其适合显示,有人请帮助我……

您应该使用视频控制

videoControl.setDisplaySize(宽度、高度)

注意:但在某些诺基亚手机中,3gp视频无法缩放

希望这对你有帮助