Last active
December 17, 2015 00:09
-
-
Save allensarkisyan/5518862 to your computer and use it in GitHub Desktop.
Check for HTTP Live Streaming (HLS) playback compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hlsCompatible = (function() { | |
try { | |
if (/ip(?:hone|[a|o]d)/gi.test(navigator.userAgent)) { return true; } | |
return (document.createElement('video').canPlayType('application/x-mpegURL').length > 0); | |
} catch(e) { | |
return false; | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment