在VS2010中使用HTML5时,我不明白源标签如何获取视频的路径。我认为它可以是绝对或相对路径。
我尝试的内容非常简单:
<video id="my_video" width="480" height="300" controls preload="none" poster="webm/art_leaf_resized.jpg">
<source src="webm/Along_the_Path.mp4" type="video/mp4" />
<source src="webm/Along the Path.webm" type="video/webm" />
<source src="webm/Along the Path.ogv" type="video/ogg" />
</video>
然而,在VS2010,Firefox和IE9中按F5不能定位显示X的视频。Chrome可以找到视频并播放。
海报图像显示正确,也没有丢失。海报图像与视频在相同目录下?
文件目录:
一个基本的HTML页面(HTMLPage1.htm)只包含视频元素。
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<video id="my_video" width="480" height="300" controls
preload="none" poster="webm/art_leaf_resized.jpg">
<source src="webm/Along_the_Path.mp4" type="video/mp4" />
<source src="webm/Along the Path.webm" type="video/webm" />
<source src="webm/Along the Path.ogv" type="video/ogg" />
</video>
</body>
</html>
关闭VS2010,打开IE9并拖入htm页面,视频可以在IE9、Firefox和Chrome中播放。我认为是因为VS2010做了一些操作?
我已经使用它一段时间了。我相信我没有思考,这可能是非常简单的事情。
任何帮助将不胜感激。
谢谢, deDogs