Chrome Html5视频无法显示白色,背景为灰色 [英] Chrome Html5 video can't display white, has gray background

查看:1025
本文介绍了Chrome Html5视频无法显示白色,背景为灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个介绍页面,在显示主要网站内容之前播放html5视频。
该视频具有白色背景,因此它与页面背景无缝集成。
但是,在Chrome浏览器中,整个视频都有灰色背景。

显然,2011年的这些问题表明这是/是铬的一个缺陷。他们还表示,在最新的chrome更新中bug已经消失。但是,我下载了最新的chrome版本,27.0.1453.110米,问题仍然存在?

 <身体GT; 
< video id =introVideowidth =774height =400oncanplay =playIntroVideo()>
< source src =http://users.telenet.be/A-I/ChromeBugTest.mp4type =video / mp4/>
浏览器ondersteunt geen html5视频
< / video>
< / body>

使用Chrome浏览器时,您会看到灰色背景



........编辑2 ................................... ...............



使用pandavengers回答,我添加了这个css,它有一个可接受的结果:

  @media屏幕和(-webkit-min-device-pixel-ratio:0){
video {-webkit-filter:brightness (108.5%); }
}


解决方案

http://jsfiddle.net/Ykmya/8/



这是一个简单的解决方法,我只是使用webkit过滤器来提高亮度。我将它绘制到画布上,然后过滤像素,这应该更平滑,但我无法通过跨域访问您的视频。相反,我只是使用CSS样式

  video {
-webkit-filter:brightness(108.5%);
}

编辑:我已经修复了最新版本的Chrome我相信。 / p>

We have an intro page which plays a html5 video before the main site content is displayed. The video has a white background so it integrates seemlessly with the page background. However, in the chrome browser the whole video has a gray background.

Apparently, these questions from 2011 indicate this was/is a bug in chromium. They also state the bug was gone in the latest chrome update. However, I downloaded the latest chrome version, 27.0.1453.110 m, and the problem is still there?

html 5- Videos - White is washed off in Chrome

Unwanted Background color/artifact on HTML5 Video Tag

Does anyone have any solution or workaround for this problem ? ... This bug renders our whole project useless ... It seems unbelievable to me that despite of the html5 hype, chrome can't play whites in videos since 2011 ??

....... EDIT ....................................................

Ok, I've created a jsfiddle project : http://jsfiddle.net/Ykmya/5/

<body>
<video id="introVideo" width="774" height="400"  oncanplay="playIntroVideo()">
    <source src="http://users.telenet.be/A-I/ChromeBugTest.mp4" type="video/mp4" />
    Uw browser ondersteunt geen html5 video
</video>
</body>

When viewed with Chrome, you will see the gray background

........ EDIT 2 ..................................................

using pandavengers answer, I added this css, which has an acceptable result :

@media screen and (-webkit-min-device-pixel-ratio:0) {
    video{ -webkit-filter: brightness(108.5%); }
}

解决方案

http://jsfiddle.net/Ykmya/8/

Here's a simple fix, I simply upped the brightness using a webkit filter. I was going to draw it onto canvas and then filter the pixels, which should be much smoother, but I cannot access your video through cross-domains. Instead I just used the css style

video{
     -webkit-filter: brightness(108.5%); 
}

Edit: This has been fixed on the latest version of Chrome I believe.

这篇关于Chrome Html5视频无法显示白色,背景为灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆