code for playing and pausing a video