Flash player h.264 detection script

Does what it says on the label, Adobe has introduced h.264 codec inside Flash Player 9 Update 3 (v 9.0.115.0) this script detects if you have below that version installed/or flsh player 10 in that case wont matter (i hope, haha).

below is a sample code, in flash:


//Flash player h.264 detection script//
//Flash Player 9 Update 3 (v 9.0.115.0)//
res.text += ‘///// h.264 detection script ///// \n\n’;

//dissection
fpv = System.capabilities.version.split(” “);
fpvArray = fpv[1].split(“,”);
fpvCurrent = Number(fpvArray[0]+”.”+fpvArray[1]);
fpvBuild = Number(fpvArray[2]);

//results
trace(‘flash player settings\n — \nfpv full version = ‘+fpv+’\nfpv current = ‘+fpvCurrent+’\nfpv build = ‘+fpvBuild+’ \n\n’);
res.text += ‘flash player settings\n — \nfpv full version = ‘+fpv+’\nfpv current = ‘+fpvCurrent+’\nfpv build = ‘+fpvBuild+’ \n\n’;

function fpvXcheck(){
res.text += ‘run detection\n — \n’;
trace(‘run detection\n—’);
//fpvX version check?
fpvX = 10;
//
if (fpvCurrent>=fpvX) {
trace(‘flash player(‘+fpvX+’) detected h.264 supported.’);
res.text += ‘flash player(‘+fpvX+’) detected h.264 supported.’;
} else {
trace(‘flash playerX not installed, run flash9 check?’);
res.text += ‘flash playerX not installed, run flash9 check?’;
checkCurrent();
}
}
fpvXcheck();

function checkCurrent() {
//checkCurrent
if (fpvCurrent == “9″) {
trace(‘\nfpv current(‘+fpvCurrent+’) = installed’);
res.text += ‘\nfpv current(‘+fpvCurrent+’) = installed’;
checkBuild();
} else {
trace(‘\nfpv current(‘+fpvCurrent+’) = incorrect, please update flash player v(9.0.115.0) or higher. \n’);
res.text += ‘\nfpv current(‘+fpvCurrent+’) = incorrect, please update flash player v(9.0.115.0) or higher. \n’;
}
}

function checkBuild() {
//checkBuild
if (fpvBuild>=115) {
trace(‘\nfpv build(‘+fpvBuild+’) = correct \n\n*successful! flash player supports h.264′);
res.text += ‘\nfpv build(‘+fpvBuild+’) = correct \n\n*successful! flash player supports h.264′;
} else {
trace(‘\nfpv build(‘+fpvBuild+’) = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264′);
res.text += ‘\nfpv build(‘+fpvBuild+’) = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264′;
}
}

//end

full list of 'System.capabilities' functions:

System.capabilities.avHardwareDisable AVD
System.capabilities.hasAccessibility ACC
System.capabilities.hasAudio Indicates A
System.capabilities.hasAudioEncoder AE
System.capabilities.hasEmbeddedVideo EV
System.capabilities.hasMP3 MP3
System.capabilities.hasPrinting PR
System.capabilities.hasScreenBroadcast SB
System.capabilities.hasScreenPlayback SP
System.capabilities.hasStreamingAudio SA
System.capabilities.hasStreamingVideo SV
System.capabilities.hasVideoEncoder VE
System.capabilities.isDebugger DEB
System.capabilities.language L
System.capabilities.localFileReadDisable LFD
System.capabilities.manufacturer M
System.capabilities.os Indicates OS
System.capabilities.pixelAspectRatio AR
System.capabilities.playerType PT
System.capabilities.screenColor COL
System.capabilities.screenDPI DP
System.capabilities.screenResolutionX R
System.capabilities.screenResolutionY R
System.capabilities.serverString n/a
System.capabilities.version V


read more here

http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary705.html

Vote in HexoSearch

2 Responses to “Flash player h.264 detection script”

  1. john says:

    luvvly jubbly – will check it out

  2. :) says:

    will try this out..

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

  • Categories

  • Recent Comments

  • Recent Posts

  • Tumblr

  • Flickr Recent Photos

    cherry tree woodstonja_gravestonesPockey Chimp FlavourAUTO FTW! :)darkdaystayouttiger kittenbirdofpreyfirst photo i took with my 1000dself_portrait_02
  • XFIRE (wkly hrs pld)

  • Last.FM

  • Tags

    .MP4 Actionscript Action Script Advertising AS2 AS3 backtrack BT4 bug Call of Duty capcom centOS cpanel crossdomain Eyeblaster eyeblaster HD f4v Flash h264 HD high definition Install internet explorer Linux load loadMovie MIME MIME Types MW2 Nazi Zombies pc PHP ports preloader release date rich media shared objects Stage SWF SWFOBJECT torrents Video video/mp4 VMware win7