使用 C# 缓冲媒体内容,同时在 Windows Media Player 中播放另一个媒体内容
我正在用 C# 开发一个应用程序,该应用程序有一个嵌入了 Windows Media Player 的表单。 我的应用程序中有几个指向某些在线内容的链接。 我希望用户通过单击按钮将内容从一个内容更改为另一个内容。 由于WMP在缓冲下一个内容时花了一些时间,所以我想继续播放当前内容。 AXWindowsMediaPlayer 类中有一个名为“Buffering”的事件,该事件在媒体播放器完成缓冲内容时发出信号。 但我无法使用单个 AXWindowsMediaPlayer 对象来实现此目的。 无论我做什么,我都无法在缓冲第二个内容的同时继续播放第一个内容。 :(
有什么想法吗?
提前致谢。
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. :(
Any ideas?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您根据需要交换两个 Player 控件实例。
或者,如果连接足够快,则可以在本地系统上缓存每个项目并从那里播放。
I suggest two instances of the Player control that you swap out as needed.
Alternatively, if the connection is fast enough cache each item on the local system and play from there.