Fixed bug triggered if leaving the video view while recording.