1 Reply Latest reply on Jan 19, 2012 3:59 AM by 902571

    When a JMF Player has Stopped

    902571
      I'm new to this framework. I'm playing an video file and I'd like to be able to listen to the Player (or other object) in order to know when the video is finished so that I can close it and hide the frame containing it. I can get the duration of the Player and then close and hide the frame after that amount of time has elapsed, but I'd prefer to have a genuine event coming from the Player (or other object) which signaled that the show was over.

      Thanks for any tips.
        • 1. Re: When a JMF Player has Stopped
          902571
          I see. You create a ControllerAdapter object and pass it to your player object
          player.addControllerListener(myControllerAdapter)
          and implement (override) this ControllerAdaper method:
          endOfMedia(EndOfMediaEvent eome)
          so that you take whatever action you want when the file ends (player.close() or whatever.)