使用 C# 缓冲媒体内容,同时在 Windows Media Player 中播放另一个媒体内容

发布于 2024-07-11 15:01:18 字数 333 浏览 8 评论 0原文

我正在用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

阿楠 2024-07-18 15:01:18

我建议您根据需要交换两个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文