Skip to content

Instantly share code, notes, and snippets.

@allensarkisyan
Last active December 17, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allensarkisyan/5518862 to your computer and use it in GitHub Desktop.
Save allensarkisyan/5518862 to your computer and use it in GitHub Desktop.
Check for HTTP Live Streaming (HLS) playback compatibility
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