我有视频
<div id="video" style="--aspect-ratio:3/1;">
<video autoplay muted loop>
<source src="fotky/video.mp4" type='video/mp4; codecs=" H.264/MPEG-4"'>
<source src="fotky/video.ogv" type="video/ogv" >
<source src="fotky/video.webm" type="video/webm" >
<p>Váš prohlížeč nepodporuje video</p>
</video>
</div>
在IE 11中,它什么也不显示。我试过像here这样的编解码器。但甚至type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'
都不起作用。
我该怎么做才能使其正常工作?还有其他编解码器吗?
编辑:
<div id="video" style="--aspect-ratio:3/1;">
<video autoplay muted loop>
<source src="fotky/video.mp4" type="video/mp4">
<source src="fotky/video.ogv" type="video/ogv" >
<source src="fotky/video.webm" type="video/webm" >
<p>Váš prohlížeč nepodporuje video</p>
</video>
答案 0 :(得分:0)
尝试删除编解码器,并在IE 11中通过双引号将类型传递给我。
<!doctype html>
<head>
</head>
<body>
<div id="video" style="--aspect-ratio:3/1;">
<video autoplay muted loop>
<source src="C:\Users\Administrator\Desktop\SampleVideo.mp4" type="video/mp4">
<source src="fotky/video.ogv" type="video/ogv" >
<source src="C:\Users\Administrator\Desktop\big-buck-bunny_trailer.webm" type="video/webm" >
<p>Váš prohlížec nepodporuje video</p>
</video>
</div>
</body>
</html>
输出: