Bug 943556 - Attempt to fix intermittent orange by using a later event (play instead of loadedmetadata) to check for media element sizes. Also include debugging information for the user agent. Also introduce a waitForCondition to wait until the replaced element has finished resizing based on the videocontrols resizing code. r=Gijs