This is the relevant code to run video:
<video id="video" src="videos/clip.mp4" type='video/mp4' controls='controls'>
Your brwoser doesn't seems to support video tag
</video>
This code work fine separately, but when trying to fade it in:
function showVideoPlayer(){
console.log('video displayed');
$("#video").fadeIn('medium');
}
it doesn't seems to work and i got this:
As you can see: Video format or MIME type is not supported.
The video container is hidden in css:
#video{
position:fixed;
border:solid 1px #000000;
width:654px;
height:454px;
background-color:#FFFFFF;
left:23%;
top:11%;
display:none;
}
This is the idea, the video container is hidden (display:none
), when needed, i call the function showVideoPlayer
to show the video container. However that doesn't work and produce me this error in FireFox
and a blank screen in Chrome and IE9.
Am i missing something? is the fadeIn
function seems to get me wrong?
This question is related to
javascript
jquery
css
html
In my case, this error:
Video format or MIME type is not supported.
Was due to the CSP in my .htaccess that did not allow the content to be loaded. You can check this by opening the browser's console and refreshing the page.
Once I added the domain that was hosting the video in the media-src
part of that CSP, the console was clean and the video was loaded properly. Example:
Content-Security-Policy: default-src 'none'; media-src https://myvideohost.domain; script-src 'self'; style-src 'unsafe-inline' 'self'
FIXED IT!
I was losing my mind over this one. Reset firefox, tried safe mode, removed plugins, debugged using developers tools. All were to no avail and didn't get me any further with getting my online videos back to normal viewing condition. This however did the trick perfectly.
Within Firefox or whatever flavor of Firefox you have(CyberFox being my favorite choice here), simply browse to https://get.adobe.com/flashplayer/
VERIFY FIRST that the website detected you're using FireFox and has set your download for the flash player to be for Firefox.
Don't just click download. PLEASE PLEASE PLEASE SAVE YOURSELF the migraine and ALWAYS make sure that the middle section labeled "Optional offer:" is absolutely NOT CHECKED, it will be checked by default so always UNCHECK it before proceeding to download.
After it's finished downloading, close out of Firefox. Run the downloaded setup file As Administrator. It takes only a few seconds or so to complete, so after it's done, open up Firefox again and try viewing anything that was previously throwing this error. Should be back to normal now.
Enjoy!
For Ubuntu 14.04
Just removed the package Oxideqt-dodecs then install flash or ubuntu restricted extras
and you are good to go!!
Source: Stackoverflow.com