IE9 - HTML5 MP4 Playback Problem: Strange Color Difference

I have a really weird problem playing videos in IE9 and HTML5. I have a .mp4 file that should combine with a background that works great in Chrome. But when playing in IE9, the video takes on a slightly darker shade than in other browsers - a shade that does not appear when using my Flash player for IE7 and IE8.

HTML code here:

<video id="banner-video-0" width="1280" height="572" autobuffer="true"> <source src="/Media/Video/video.mp4" type="video/mp4"> <source src="/Media/Video/video.webm" type="video/webm"> <source src="/Media/Video/video.ogv" type="video/ogg"> </video> 

I think this may be some kind of problem with codecs.

+4
source share
2 answers

In my case, Safari was the only major browser playing MP4 to fix the problem that I passed in the JavaScript below that defines Safari and adds the class to the body

 if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) { $('body').addClass('safari'); } 

Then in my CSS file I changed the background color to match the background image

 body.safari, .safari video, .safari .mantle { background:#3b3b3b; } 
+1
source

Buddy, there is always a difference in the shades and problems with CSS in browsers (if you are in IE and any other browsers) that make them different and kill us (developers);)

Anywayz, try to handle browser compatibility by adding script code to detect the browser and change the colors through Javascript.

Njoy !!!

-1
source

All Articles