问题
For some reason my webpage does not showing flash content on Internet Explorer 10. It is working earlier versions of IE.
I'm using swfobject.js for the flash content.
Here is the code:
<script type="text/javascript">
swfobject.embedSWF("http://www.foobar.com/flash/movie.swf", "noflash", "223", "154", "9.0.0", "http://www.foobar.com/flash/expressInstall.swf");
</script>
<div id="noflash">
</div>
I notice that the flash is working on some of the websites but not in mine.
What could be the problem here?
回答1:
To clarify, Internet Explorer 10 and higher supports Flash Player on Windows 8 and above; however, modernization efforts in Internet Explorer have broken SWFObject's ability to distinguish between Internet Explorer and other browsers. Because IE uses the ActiveX control as opposed to the NPAPI or PPAPI plug-in, the invocation is different and the changes in IE inject compatibility problems with existing JavaScript on many sites.
SWFObject is a useful library, and it provides some additional benefit to the standard HTML object and embed tags. I've seen some comments in the SWFObject bugbase saying that the issue is resolved in SWFObject 2.1, but not in SWFObject 2.2. I haven't tested it, but that might be a good short-term workaround.
Otherwise, you can find a ton of examples on how to use the conventional HTML approach to embed Flash content on your site. Here's a complete guide to the syntax: https://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html
Embedding plug-ins via JavaScript became popular as a method for working around some patent trolling activity in the early 2000s, but I believe that the IP holders successfully extorted money from the folks with deep pockets and have returned to their respective caves. Object and Embed tags work in all major browsers at this point, and are a viable workaround until such time as SWFObject gets an update.
回答2:
Seems the geniuses at Microsoft decided not to support flash in some versions of IE10 that comes with Windows 8. According to these support pages, you need to add a meta tag to prompt the user to switch to a compatible version of IE10.
< meta http-equiv="X-UA-Compatible" content="requiresActiveX=true" />
Ain't Microsoft grand?
http://msdn.microsoft.com/en-us/library/ie/jj193557(v=vs.85).aspx
https://code.google.com/p/swfobject/issues/detail?id=643
来源:https://stackoverflow.com/questions/15873578/flash-not-working-on-windows-8-internet-explorer-10