The HTML5 DOM has methods, properties, and events for the and ... canPlayType(), Checks if the browser can play the specified audio/video type.
www.w3schools.com