C# axWindowsMediaPlayer
我想实现UDP接收,更改axWindowsMediaPlayer控件播放内容的功能。
例如 收到消息“123”,播放123.avi
收到消息“456”,播放456.wmv
现初始化如下:
axWindowsMediaPLayer1.settings.autoStart = true; // 一开始播放背景影片
axWindowsMediaPLayer1.settings.setMode("Loop", true);
axWindowsMediaPLayer1.URL = "bg.wmv"
axWindowsMediaPLayer1.Ctlcontrols.play();
接收到消息时:
axWindowsMediaPLayer1.Ctlcontrols.stop();
axWindowsMediaPLayer1.URL = "123.avi";
axWindowsMediaPLayer1.Ctlcontrols.play();
症状:消息收到之后MediaPlayer变为黑屏,不播放相应视频。
求教如何解决。
顺便问一句,我的需求中UDP接收处理怎么做比较好?我现在是timer控件定时查看,会出现假死现象。。。