0

I have video

    <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>

And in IE 11 it does not show anything. I tried codecs like is described here. But not even type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"' worked.

What can I do to make it work? Any different codec?

Edit:

<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>

pandik70
  • 185
  • 1
  • 3
  • 9

1 Answers1

0

Try to remove codec and pass the type with in double quotation works on my side in 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>

Output:

enter image description here

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
  • Still it does not work. It behaves the same even with the codec and without. – pandik70 Oct 30 '18 at 09:38
  • Did you pass the type with in double quotes? Can you show your testing result and your modified code? I will again try to make a test on my side to check the result. – Deepak-MSFT Oct 30 '18 at 09:40