效果很震撼!有电影院的感觉了。呵呵。
看了下代码,依然是 在一个canvas
里嵌入<video>
然后getImageData
代码:
var canvas = document.createElement('canvas'), video = document.getElementsByTagName('video')[0], ctx = canvas.getContext('2d'); ctx.drawImage(video, 0, 0, video.width, video.height); var block_width = 50; var pixels = ctx.getImageData(0, 0, block_width, canvas.height); //http://www.cnblogs.com/roucheng/