added the 'canplay' event handler to the media element.