问题
I have a webpage that has an animated flash gallery on its homepage.
By default, google chrome/firefox/safari ... does not let this page enable the flash plugin, so the gallery doesn't show.
Not only this happens, but also there is no prompt from the webpage requesting the user to enable flash, and the gallery completely disappear when flash is not enabled, so there's not even an error message saying that you need to enable flash to see the gallery.
What do I need to do on the page so that it requests the user to enable flash? Something like button to enable and then request permission from a browser.
Here is the sample which asks this permission in a browser.
https://quickfire.gcontent.eu/aurora/default.aspx
Cheers!
回答1:
This will request to enable the flash player if its already installed otherwise, it will direct you to adobe page to download the flash player.
<a href="https://get.adobe.com/flashplayer/" target="_blank" rel="nofollow">Click here to activate it</a>
回答2:
you should take the hint...Flash is dead...not supported...on its last legs.. covert your gaming/gambling website to html5>Canvas>SVG>scripting.
IE also has ActiveX filtering that blocks ActiveX controls from running on websites. see Tools ActiveX filtering.
The common design pattern for embedded plugins/ActiveX controls is to provide a fallback (link, image) nested INSIDE the parent object.
<object data="uri to flash resource" type="application/flash">
<param name="autoplay"/>
<embed src="uri to flash resource" type="application/flash"/>
<p class="noflash">Opps.... your browser does not support flash, or it is disabled or it is blocked by ActiveX filtering.</p>
</object>
For activeX filtering feature detection.. place a hidden div at the top of your document.... directly after the body. eg.
<body>
<div role="alert" id="AXon" style="display:none;color:lime;background:orange">ActiveX filtering for this site is turned on...</div>
and at the bottom of the document (so it executes when the onload event fires) the following script block.
<script type="text/javascript">
// Best Practice: First detect if ActiveX Filtering is enabled
if(document.documentMode&&document.documentMode>8){
if (typeof window.external.msActiveXFilteringEnabled == "unknown"
&& window.external.msActiveXFilteringEnabled() == true) {
document.getElementById('AXon').style.display = 'block';
//document.write("ActiveX Filtering has hidden this content.");
}
else {
// Either the browser isn’t IE, or ActiveX Filtering is not enabled in IE
//document.write('<a style=\"text-decoration: none;\" href=\"http://go.microsoft.com/fwlink/?LinkID=124807\"><img alt=\"Get Microsoft Silverlight\" src=\"http://go.microsoft.com/fwlink/?LinkId=108181\"/><\/a>');
}
}
</script>
But the only best answer is to put Flash out of its misery.
回答3:
I found a solution, I make a flash button and embed to my page overlayer with HTML button, then the user clicks on button, it event fire the flash button event and then the browser will ask for permission to run the flash on a browser.
This is work if a flash has been already installed on the browser. If not it will show the only text and can not find any solution to make this process in a browser.
来源:https://stackoverflow.com/questions/49324084/prompt-request-to-enable-flash-on-browsers