WPF Web浏览器从Internet播放视频 [英] Wpf Web Browser playing video from Internet
问题描述
我已经使用Web浏览器控件创建了wpf应用程序.我想在网络浏览器中播放视频.
我写了下面的代码,它给了我无效的来源 错误,但是如果我将src提供给本地mp4文件,则它将播放视频.
以及下面的html文件也可以在IE中使用.
webBrowser.NavigateToString(@"< html5>
< div id ='video_holder'>
<视频控件自动播放preload ='metadata'style ='width:500; height:500;'>
< source src ='https://xxx.sharepoint.com/sites/abc2/Shared%20Documents/abc%203D%20Fundamentals/Lesson%2001% 20-%20Draw%20Where%20You%20Want%20To/01%20Lesson%20Set-up.mp4' type ='video/mp4'>
< source src ='movie.ogg'type ='video/ogg'>
您的浏览器不支持HTML5视频标记.
</video
</div>
</html5>
")
任何帮助?
我无法使用该网址,但我想xxx.sharepoint应该是www.sharepoint.
Hi,
I have created wpf application with web browser control. I want to play video in my web browser.
I have written below code and it is giving me Invalid source error, but if I give src to my local mp4 file then it plays video.
and also below html file works in IE.
webBrowser.NavigateToString(@"<html5>
<div id='video_holder'>
<video controls autoplay preload='metadata' style=' width:500; height:500;'>
<source src='https://xxx.sharepoint.com/sites/abc2/Shared%20Documents/abc%203D%20Fundamentals/Lesson%2001%20-%20Draw%20Where%20You%20Want%20To/01%20Lesson%20Set-up.mp4' type='video/mp4'>
<source src='movie.ogg' type='video/ogg'>
Your browser does not support the HTML5 video tag.
</video
</div>
</html5>
");
any help??
I can't get the url to work, but I imagine that xxx.sharepoint should be www.sharepoint.
这篇关于WPF Web浏览器从Internet播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!