video.addEventListener('play', function() {
var $this = this;
(function loop() {
if (!$this.paused && !$this.ended) {
ctx.drawImage($this, 0, 0);
ctx.filter = 'blur(10px)';
setTimeout(loop, 1000 / 30);
}
})();
}, 0);