Using the onHidden option to close the video when the dialog is dismissed.