lwuit
  1. lwuit
  2. LWUIT-485

Lwiut 1.5 Black Area shown after playing video in VideoComponent, How to remove it?

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      All Java enabled devices

      Description

      I created a form to play video and I added to it a VideoComponent, after the media finished another form should be displayed, But the another form displayed and i see just the title and the menu and the center of the form covered by black area which is the area of the VideoComponent from the VideoPlayer form.

      Look at this figure http://www.java.net/sites/default/files/lwuitVideoErr.png

      I tested it on many devices, but the same thing happend, Look at the video player Form src code

      import com.sun.lwuit.Dialog;
      import com.sun.lwuit.Form;
      import com.sun.lwuit.VideoComponent;
      import com.sun.lwuit.layouts.BorderLayout;
      import java.io.IOException;
      import javax.microedition.media.Player;
      import javax.microedition.media.PlayerListener;
      /**

      • @author Mohammad
        */
        public class VideoPlayer extends Form implements PlayerListener
        {
        private Player player1;
        private VideoComponent videoComponent;
        public VideoPlayer(String videoResURLWithExtension, String videoType) {
        setLayout(new BorderLayout());
        try {
        videoComponent=VideoComponent.createVideoPeer(getClass().
        getResourceAsStream("/"+videoResURLWithExtension),"Video/"+videoType);
        videoComponent.setFullScreen(true);
        addComponent(BorderLayout.CENTER, videoComponent);
        player1=((Player)videoComponent.getClientProperty("Player"));
        player1.addPlayerListener((PlayerListener)this);
        } catch (IOException ex) {
        Dialog.show("Error:", "Error in creating video player : "+ex.getMessage(), "OK", null);
        }
        }
        public void playerUpdate(Player player, String event, Object eventData) {
        try {
        if (event.equals(PlayerListener.END_OF_MEDIA)) {
        videoComponent.stop();
        removeAll();
        MidletMain.mainForm.show();
        System.gc();
        }
        } catch (Exception e) {
        }
        }
        public void show() {
        super.show();
        videoComponent.start();
        }
        }
        How to solve this problem?

      I posted this on lwuit forum
      http://www.java.net/forum/topic/mobile-embedded/lwuit/lwiut-15-black-area-shown-after-playing-video-videocomponent-how-remove-it

      Mohammad Abu Hmead

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            abuhmead1987
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: