Added a resizeVideo function to define the video's displayRect