Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何功能可以知道音频是否播放完毕?我想在音频播放后做一个功能,我有两个想法。首先,如果音频完成后有一个功能,第二个是我将获取音频的长度并将其放在计时器上并设置它。请帮助我完成音频或音频的时间长度谢谢。
您必须使用 AxWindowsMediaPlayer.playState 属性来了解播放器的状态。看这个:
if (player.playState == WMPLib.WMPPlayState.wmppsPlaying) { Console.WriteLine("Is playing!"); } else { Console.WriteLine("Is NOT playing!"); }