Skip to content

Instantly share code, notes, and snippets.

@ErBlack
Last active September 14, 2015 12:45
Function that checks MIME type support in browser. (@see demo http://jsfiddle.net/ErBlack/e2Ldgz7a/embedded/result/)
var mimeCheck = function (type) {
return Array.prototype.some.call(navigator.plugins, function (plugin) {
return Array.prototype.some.call(plugin, function (mime) {
return mime.type == type;
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment