如何通过vlc插件播放youtube视频?

发布于 2024-09-27 19:55:25 字数 261 浏览 11 评论 0原文

我正在 C# Windows 表单应用程序中使用 vlc 插件。它适用于所有媒体类型,但无法通过插件播放 YouTube 视频,也可以在主播放器本身中播放。我正在使用以下代码:

    axVLCPlugin2.playlist.add("http://www.youtube.com/watch?v=BxPtmLmqdXU");
    axVLCPlugin2.playlist.play();

应该如何才能播放 youtube 视频?

I'm using vlc plugin into C# Windows form application. It works fine with all media type but it can't play youtube videos through the plugin also it can be played in the main player itself. I'm using the following code :

    axVLCPlugin2.playlist.add("http://www.youtube.com/watch?v=BxPtmLmqdXU");
    axVLCPlugin2.playlist.play();

How the could should be to be able to play youtube videos ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

节枝 2024-10-04 19:55:25

您指定的是 YouTube 网页的 URL,而不是视频本身的 URL。您需要获取视频本身的 URL 并指定它。有许多网页允许您提取视频的 URL(给定 YouTube 页面 URL),例如:

获取链接到实际视频

You are specifying the URL of the youtube web page, not of the video itself. You need to get the URL of the video itself and specify that. There are many web pages that allow you to extract the URL of the video, given a youtube page URL, like:

Get link to actual video

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