Process.start question

When using a process.start command to start a media player and play a song at a file location, is there a way programatically to tell when the song or media has completed playing

Fred




Answer this question

Process.start question

  • M. Buragohain

    This is a little bit of a tricky question because if a media player is in an executable file, chances are it's relying on an API at some level.

    When you have an application depending upon the API there are several ways to to tell if a song has completed. I've used the MCIsendstring inteface with the windows media player. There were several modes. I could tell the player to play the song... however the player with non-interruptible in the that mode. What I finally did was to tell it to play BUT I polle it every second to see if it was finished. This arrangement was quite interruptible and worked very well.

    AGAIN.... if a player is already in an executable you have greatly reduced access to any of this.



  • Jamskin Chen

    Hi Fred,

    No, the mediaplayer as a process, we can only catch the process event.

    e.g. Process.exit which will be fired when the process exited.



  • Process.start question