如何从WebBrowser播放和暂停YouTube视频? [英] How can I play and pause a YouTube video from WebBrowser?

查看:69
本文介绍了如何从WebBrowser播放和暂停YouTube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在我的WinForm应用程序上播放和暂停使用WebBrowser播放背景的YouTube视频。用户没有在YouTube上看到WebBrowser和媒体播放器。我想用两个Button控件播放和暂停视频。我尝试了HtmlElement.InvokeMember()但我无法得到任何结果。我怎么能这样做? div class =h2_lin>解决方案

你不能。 YouTube播放器不会公开任何界面来控制它。


I want to be able playing and pausing YouTube videos that is playing background with a WebBrowser on my WinForm application. Users don't see the WebBrowser and the media player on YouTube.I want to play and pause the video with two Button controls.I tried HtmlElement.InvokeMember() but I couldn't get any result.How can I do it?

解决方案

You can't. The YouTube player doesn't expose any interface to control it like that.


这篇关于如何从WebBrowser播放和暂停YouTube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆