updated video play code