Create video element first and check if it can play mime type using canPlayType method before falling back to object. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#Methods .