Reputation: 111
I don't know why, but recently google chrome is not running my flash vídeos anymore, It does run if I enable flash player.
Back then, Chrome itself asked for those permissions, but now it's not asking :(
Is there a way (an API) so I can ask for those permission to run?
Thanks.
Upvotes: 0
Views: 1260
Reputation: 1271
Try this cheat:
/**
* Tries to show browser's promt for enabling flash
*
* Chrome starting from 56 version and Edge from 15 are disabling flash
* by default. To promt user to enable flash, they suggest to send user to
* flash player download page. Then this browser will catch such request
* and show a promt to user:
* https://www.chromium.org/flash-roadmap#TOC-Developer-Recommendations
* In this method we are forcing such promt by navigating user to adobe
* site in iframe, instead of top window
*/
function requestFlashPermission() {
var iframe = document.createElement('iframe');
iframe.src = 'https://get.adobe.com/flashplayer';
iframe.sandbox = '';
document.body.appendChild(iframe);
document.body.removeChild(iframe);
}
var isNewEdge = (navigator.userAgent.match(/Edge\/(\d+)/) || [])[1] > 14;
var isNewSafari = (navigator.userAgent.match(/OS X (\d+)/) || [])[1] > 9;
var isNewChrome = (navigator.userAgent.match(/Chrom(e|ium)\/(\d+)/) || [])[2] > 56
&& !/Mobile/i.test(navigator.userAgent);
var canRequestPermission = isNewEdge || isNewSafari || isNewChrome;
if (!swfobject.hasFlashPlayerVersion('10') && canRequestPermission) {
requestFlashPermission();
// Chrome requires user's click in order to allow iframe embeding
$(window).one('click', requestFlashPermission);
}
Based on: https://www.chromium.org/flash-roadmap#TOC-Developer-Recommendations
Upvotes: 1
Reputation: 155
Did you try following this: https://support.google.com/chrome/answer/6258784?hl=en ? Or this: https://helpx.adobe.com/flash-player/kb/enabling-flash-player-chrome.html
Edit: removed questionable info source. Thanks for pointing out.
Upvotes: 1