Skip to content

vin-ni/videomatchingbackgroundcolor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Matching HTML5 videos to a background color

This is an example on how to handle the color derivation bug concerning html5 videos that should be inserted seamlessly into a website. I use this mostly for big videos that integrate into the landing page. The full explanation on how it works can be read here.

drivation bug Live Demo here

Basically it renders the video onto a canvas and keeps it in sync with the hidden video. Simultaneously it picks up the background color of the video frame and adjusts the websites color.

The original solution comes from Feng. I added retina support and a fallback for browsers with blocked autoplay (thanks safari mobile).

Feel free to improve :)

About

Embed html videos with correct background color.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published