HTML5 Video not working in IE 11

后端 未结 8 1206
有刺的猬
有刺的猬 2020-11-29 06:59

I have a video archive that I have working in everything except IE 11. I get the error \"Error: Unsupported video type or invalid file path\" when loaded in IE 11. Below is

相关标签:
8条回答
  • 2020-11-29 07:22

    It was due to IE Document-mode version too low. Press 'F12' and using higher version( My case, above version 9 is OK)

    0 讨论(0)
  • 2020-11-29 07:25

    In my case Codec ID of mp4 file was the issue, Codec ID: isom (isom/iso2/avc1/mp41) was not playing in IE 10 and 11 using video tag, after I converted it to "mp42 (mp42/isom/avc1)" using FFmpeg it started playing in IE as well.

    0 讨论(0)
  • 2020-11-29 07:26

    I know this is old, but here is a additional thing if you still encounter problems with the solution above.

    Just put in your <head> :

    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    

    It will prevent IE to jump back to IE9 compatibility, thus breaking the video function. Worked for me, so if you still have problems, consider checking this out.

    Alternatively you can add this in PHP :

    header('x-ua-compatible: ie=edge');
    

    Or in a .htaccess file:

    header set X-UA-Compatible "IE=Edge"
    
    0 讨论(0)
  • 2020-11-29 07:26

    Although MP4 is supported in Internet explorer it does matter how you encode the file. Make sure you use BASELINE encoding when rendering the video file. This Fixed my issue with IE11

    0 讨论(0)
  • 2020-11-29 07:32

    I believe IE requires the H.264 or MPEG-4 codec, which it seems like you don't specify/include. You can always check for browser support by using HTML5Please and Can I use.... Both sites usually have very up-to-date information about support, polyfills, and advice on how to take advantage of new technology.

    0 讨论(0)
  • 2020-11-29 07:35

    I've been having similar issues of a video not playing in IE11 on Windows 8.1. What I didn't realize was that I was running an N version of Windows, meaning no media features were installed. After installing the Media Feature Pack for N and KN versions of Windows 8.1 and rebooting my PC it was working fine.

    As a side-note, the video worked fine in Chrome, Firefox, etc, since those browsers properly fell back to the webm file.

    0 讨论(0)
提交回复
热议问题