How to check if flashPlayer version s pepperFlash on runtime?
I want to handle stage3d differently for pepperflash and differently for standard flash player version
Update:
I found one javascript function, so if anyone can help me to call it with ExternalInterface:
var checkForPepper = function() {
if (navigator.plugins) {
for (var i=0, count = navigator.plugins.length; i < count; i++) {
var filename = navigator.plugins[i].filename;
if (filename === 'pepflashplayer.dll' || filename === 'PepperFlashPlayer.plugin') return true;
}
}
return false;
Just update of your answer for more readable JS in AS3:
var js:XML = <js>
<![CDATA[
function() {
if (navigator.plugins) {
for (var i=0, count = navigator.plugins.length; i < count; i++) {
var filename = navigator.plugins[i].filename;
if (filename === 'pepflashplayer.dll' || filename === 'PepperFlashPlayer.plugin')
return true;
}
}
return false;
}
]]>
</js>
if(ExternalInterface.available)
{
var isPepper:Boolean = ExternalInterface.call(js);
ExternalInterface.call("alert('isPepper = "+isPepper+"')");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With