This simple demo detects when the video ends then closes the window.