I am developing an application in C# that has a form with Windows Media Player embedded inside. There are several links to some online content in my app. and I want user to change the content from one to another with a button click. Since WMP spent some time while buffering for the next content, I want to continue playing the current content. There is an event called "Buffering" in AXWindowsMediaPlayer
class that signals when media player finishes buffering the content. But I could not achieve this with a single AXWindowsMediaPlayer object. Whatever I did, I could not continue to play the first content while buffering the second. :(
我正在使用嵌入了Windows Media Player的表单在C#中开发一个应用程序。我的应用程序中有一些指向某些在线内容的链接。我想让用户点击按钮将内容从一个更改为另一个。由于WMP花了一些时间来缓冲下一个内容,我想继续播放当前内容。 AXWindowsMediaPlayer类中有一个名为“缓冲”的事件,用于指示媒体播放器何时完成内容缓冲。但是我无法使用单个AXWindowsMediaPlayer对象实现此目的。无论我做了什么,我都无法继续播放第一个内容,同时缓冲第二个内容。 :(
Any ideas?
Thanks in advance.
提前致谢。
1 个解决方案
#1
I suggest two instances of the Player control that you swap out as needed.
我建议您根据需要更换两个Player控件实例。
Alternatively, if the connection is fast enough cache each item on the local system and play from there.
或者,如果连接足够快,则缓存本地系统上的每个项目并从那里进行播放。
#1
I suggest two instances of the Player control that you swap out as needed.
我建议您根据需要更换两个Player控件实例。
Alternatively, if the connection is fast enough cache each item on the local system and play from there.
或者,如果连接足够快,则缓存本地系统上的每个项目并从那里进行播放。