Added onloadedmetadata, width and height now set using meta data if undefined.