1 Reply Latest reply: Jun 6, 2011 12:08 PM by 865727 RSS

    how to play video in full size

    866889
      <h2>
      Hi,

      i implemented an j2me application to play video, but video size(w,h) is very small.
      when i set video controller to full screen it is play just audio with no video.

      how to play a video in j2me with full screen size?
      </h2>


      public void playerUpdate(Player player, String event, Object eventData) {
                          
                if(event.equals(PlayerListener.STARTED) &&
                          new Long(0L).equals((Long)eventData)) {
                     //check if media control video or not
                     VideoControl vc = null;
                     
                     if((vc = (VideoControl)player.getControl("VideoControl")) != null) {
                          try {
      //trying to set full video screen
                               vc.setDisplayFullScreen(true);
                               vc.setVisible(true);
                          } catch (MediaException e) {                         
                               e.printStackTrace();
                          } //try-catch
                          
                          Item videoDisp =
                               (Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);
                          

                          this.append(videoDisp);
                          
                     } //check if video control not null
                     
                } else if(event.equals(PlayerListener.CLOSED)) {

                     this.deleteAll(); // clears the form of any previous controls

                } // check started or close
                
           } //method: process when update the video Edit Post Reply Reply With Quote