Added onpause/resume handling for video player