Wrapped playFrame in requestAnimationFrame