We are using a proprietary document viewer which doesn\'t play terribly nice with the Pepper version of Flash found in some flavors of Chrome, so I\'d like to be able to detect
I couldn't get the other examples to work, but the following code works for me on both Mac and PC with Chrome PPAPI enabled or disabled. Also works correctly on other browsers.
function checkForPepper() {
return navigator.plugins && _.any(navigator.plugins, function(plugin) {
return plugin.filename === 'pepflashplayer.dll' || plugin.filename === 'PepperFlashPlayer.plugin';
});
}
alert ('Pepper enabled: '+ checkForPepper());
Note: Requires underscore.js. Fiddle here.