Skip to content

Commit

Permalink
Hls.isSupported(): ensure that MediaSource.isTypeSupported is a function
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Jun 13, 2016
1 parent 85c6ca7 commit cb78a58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class Hls {
}

static isSupported() {
return (window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'));
return (window.MediaSource &&
typeof window.MediaSource.isTypeSupported === 'function' &&
window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'));
}

static get Events() {
Expand Down

0 comments on commit cb78a58

Please sign in to comment.