commented out clearrect because it was making the video flicker even though it shouldn't. still only working when compiled to js