Reputation: 49
Is there any function to know if the audio is done playing? I want to do a function after the audio played, I have 2 ideas. First if there is a function when audio is done, second is I will get the length of the audio and put it on the timer and set it on. Please help me to get either audio is done or audio"s time length thanks.
Upvotes: 0
Views: 150
Reputation: 4883
You have to use AxWindowsMediaPlayer.playState property to know the status of the player. Look at this:
if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
{
Console.WriteLine("Is playing!");
}
else
{
Console.WriteLine("Is NOT playing!");
}
Upvotes: 1