Chrome Html5 video can't display white, has gray background

后端 未结 2 751
别那么骄傲
别那么骄傲 2020-12-16 03:11

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 backgro

相关标签:
2条回答
  • 2020-12-16 03:39

    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.

    0 讨论(0)
  • 2020-12-16 03:43

    I had similar problems with backgrounds in browsers from multiple vendors. Dark background in firefox on windows and chrome on mac.

    I ended up creating 2 versions of the video

    WebM -> Non IE mp4 -> All IE

    And then set the video ordering using conditional comments

     <!--[if !IE]><!-->
       <source src="Content/Video/1.webmsd.webm" />
       <source src="Content/Video/1.mp4" />
     <!--<![endif]-->
     <!--[if IE]><!-->
        <source src="Content/Video/1.mp4" />
        <source src="Content/Video/1.webmsd.webm" />
     <!--<![endif]-->
    
    0 讨论(0)
提交回复
热议问题