如何将youtube视频嵌入WebBrowser控件中 [英] How to embed youtube video in WebBrowser control

查看:78
本文介绍了如何将youtube视频嵌入WebBrowser控件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


推荐答案

好吧,据我所知,MS曾针对阻止某些WP7请求的Google(拥有Youtube)提出投诉.

如果您在已加载事件中执行以下操作:

webBrowser1.NavigateToString(

Well, as far as I know MS filed a complaint against Google (who owns Youtube) for blocking some WP7 requests.

If you do something like this in the loaded-event:

webBrowser1.NavigateToString(

 

"< body>< iframe宽度='800'高度='800'src ='http ://www.u2u.be'frameborder ='0'allowfullscreen></iframe>< body>< );

"<body><iframe width='800' height='800' src='http://www.u2u.be' frameborder='0' allowfullscreen></iframe><body>");

 

webBrowser1.NavigateToString(

webBrowser1.NavigateToString(

 

"< body>< iframe宽度='800'高度='800'src ='http :// www.youtube.com/embed/O6WLkyxySA0 'frameborder ='0'allowfullscreen></iframe><正文>" );

那么您最终只会得到一个黑色正方形,而没有视频.

这也是WP7 Youtube-app具有高吸吮水平的原因...

"<body><iframe width='800' height='800' src='http://www.youtube.com/embed/O6WLkyxySA0' frameborder='0' allowfullscreen></iframe><body>");

then you simply end up with a black square, and no video.

That's also the reason why the WP7 Youtube-app has a high sucking-level...

 


这篇关于如何将youtube视频嵌入WebBrowser控件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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