Posted on 2004-10-19
I am using the Windows Media Player 9.0 SDK with my C# application. When my application opens, it opens a specific audio file for playback. My problem is that I am having a hard time trying to get the duration information from the Media Player until I actually start playing the file. I start by setting the Player's URL(axPlayer.url = audiofile). After that I can access axPlayer.currentMedia.duration, but the values are all 0 until I actually call axPlayer.Ctlcontrols.play(). Is there any way I can access the duration of the media file from the player without having to start the file playing??????????