moved video events out of ready function to increase reliability