changed the switching of videos to be monitored by a timer