Thanks to the jQuery plugin "tubular". This was my first approach to make my HTML5 Video Ambilight possible for youtube videos. Unfortunately it doesn't work that good. Pretty async :(
I like it anyway :D What do you think?
| .video | |
| $(document).ready -> | |
| ambilight.on "KSqttO3NtCg", ".video" | |
| ambilight = | |
| on: (yt_id, container) -> | |
| $(container).append("<iframe width='560' height='315' src='//www.youtube.com/embed/"+yt_id+"?rel=0&controls=0&showinfo=0&autoplay=1' frameborder='0' allowfullscreen></iframe>") | |
| $("body").tubular({videoId: yt_id}); |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
| <script src="http://www.seanmccambridge.com/tubular/js/jquery.tubular.1.0.js"></script> |
| * { | |
| padding: 0; | |
| margin: 0; | |
| border: 0; | |
| outline: 0; | |
| } | |
| body { | |
| background-color: #000; | |
| } | |
| #tubular-container { | |
| filter: blur(50px) brightness(.5); | |
| -webkit-filter: blur(50px) brightness(.5); | |
| z-index: 0; | |
| } | |
| .video { | |
| width: 560px; | |
| height: 315px; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| margin: auto; | |
| z-index: 100; | |
| } |