Added video.isPlaying guard.