control event video with javascript