Skip to content

Commit

Permalink
Close GH-606: Fix IE9 canPlayType error. Fixes #519
Browse files Browse the repository at this point in the history
  • Loading branch information
heff committed Jun 28, 2013
1 parent 23fc4cc commit db97df6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/js/media/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,17 @@ vjs.Html5.prototype.defaultMuted = function(){ return this.el_.defaultMuted; };
/* HTML5 Support Testing ---------------------------------------------------- */

vjs.Html5.isSupported = function(){
return !!document.createElement('video').canPlayType;
return !!vjs.TEST_VID.canPlayType;
};

vjs.Html5.canPlaySource = function(srcObj){
return !!document.createElement('video').canPlayType(srcObj.type);
// IE9 on Windows 7 without MediaPlayer throws an error here
// https://github.com/videojs/video.js/issues/519
try {
return !!vjs.TEST_VID.canPlayType(srcObj.type);
} catch(e) {
return '';
}
// TODO: Check Type
// If no Type, check ext
// Check Media Type
Expand Down

0 comments on commit db97df6

Please # to comment.