[英]resume a paused mp3 file in c# winforms using WMPLib.WindowsMediaPlayer
使用WMPLib.WindowsMediaPlayer,我可以播放和暫停mp3文件,但無法從暫停的點繼續播放。
有人可以告訴我如何恢復這首歌嗎
謝謝
實際上,我認為這很安靜,我可以使用“暫停”方法暫停歌曲,並使用“播放”方法繼續播放:::這是我使用的代碼
WMPLib.WindowsMediaPlayer wmp = new WMPLib.WindowsMediaPlayer();
wmp.url="the mp3 path that you want to play";
//NOTE::: after the above command the mp3 file or other multimedia file will automatically play.
//And for PAUSING use this code:
wmp.controls.pause();
//AND for continue PLAYING use below code:
wmp.controls.play();
該代碼對我有用,我希望對您有用。
解決方案是更換媒體播放器。 添加對此播放器的引用: AxWMPLib.AxWindowsMediaPlayer
。 我在此項目中找到了參考。
我只是更改了玩家參考。 調整了屬性:這個“ moPlayer.Controls.pause()
”變成了“ moPlayer.Ctlcontrols.pause()
”,我開始做生意。 我希望這有幫助。 我做到了,我的播放器可以暫停並繼續。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.