如何在VB.NET的网页上显示视频 [英] How to display video on webpages of VB.NET

查看:214
本文介绍了如何在VB.NET的网页上显示视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我正在尝试在webform上显示和播放视频,但视频没有播放。

它在浏览器上显示我:



没有支持格式和mime类型的视频找到



以及当我要在com componmmet中添加窗口媒体播放器时。它不会添加工具箱...在工具箱中显示淡入淡出的标题



我尝试过:



< video width =400controls> 
< source src =mov_bbb.mp4type =video / mp4>
< source src =mov_bbb.oggtype =video / ogg>
您的浏览器不支持HTML5视频。
< / video>

解决方案

这可能是因为代码从W3Schools获取 [ ^ ]你并没有考虑到他们从他们自己的服务器提供视频的事实(路径是相对于他们自己的环境),这在你自己的计算机上不起作用。



有很多方法可以让它运行,首先是改变你自己机器上的视频路径。试试这个,

< video width =400controls> 
< source src =http://www.w3schools.com/html/movie.mp4type =video / mp4>
< source src =http://www.w3schools.com/html/movie.oggtype =video / ogg>
您的浏览器不支持HTML5视频。
< / video>



这甚至可以在您自己的计算机上运行,​​因为它会尝试从他们的服务器加载文件。



有关示例,请参阅 Tryit Editor v3.3 [ ^ ]


actually i am trying to show and play video on webform but video is not playing.
its showing me on browser like:

No video with supported format and mime type found

as well as when i m going to add window media player in com componmmet. it will not add in toolbox...showing fade title in toolbox

What I have tried:

<video width="400" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>

解决方案

That is because, likely, the code was captured from W3Schools[^] and you didn't bother considering the fact that they are providing the video from their own server (the path is relative to their own environment), and that will not work in your own computer.

There are many ways that you can make it run, first of them is to change the path to a video that you have on your own machine. Try this instead,

<video width="400" controls>
  <source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4">
  <source src="http://www.w3schools.com/html/movie.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>


This will work even from your own computer, because it will try to load the file from their server.

For a sample, see, Tryit Editor v3.3[^]


这篇关于如何在VB.NET的网页上显示视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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