2013-03-15 2 views
-2

jquery 1.9를 사용하고 있습니다. 이 jQuery 버전을 사용하면 실행중인 브라우저에서 플래시가 활성화되었는지 여부를 어떻게 확인할 수 있습니까?브라우저에서 플래시를 확인하는 방법은 무엇입니까?

+0

. http://stackoverflow.com/questions/9038034/test-whether-a-device-has-flash-enabled-modernizr-style – ahren

+0

아직 Modernizr Flash를 감지 할 수있는 신뢰할만한 필터가 없습니다.하지만 우리는 하나를 원합니다! https://github.com/Modernizr/Modernizr/issues/48을 참조하십시오. –

답변

4

이 시도 :

var hasFlash = false; 
try { 
    var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); 
    if(fo) hasFlash = true; 
}catch(e){ 
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) 
    hasFlash = true; 
} 

또는

jqplugin을 : 당신은, 모더 나이저를 위해 jQuery를하지 찾고 http://code.google.com/p/jqplugin/

$.browser.flash == true

+0

이것은 나를 위해 (충분히 좋은) 작동하는 것 같습니다. 우리는 그것이 공개 될 때 Modernizer v3으로 이동할 것입니다. – genexp