Google Chrome is not prompting the users to enable flash on my site -
google chrome no longer prompting users on site enable flash required play videos users upload. recent change , think it's due chrome disabling flash on year 2017 (i haven't changed anything). works fine on firefox.
the best solution convert videos mp4 rather flv, right second need fix problem actively using site. need way force browser prompt user enable flash. know it's possible i've seen on other sites i'm not sure how atm. ideas?
here's code plays video:
<script type='text/javascript' src='/jwplayer/swfobject.js'>/script> <div id='mediaspacex'>this text replaced</div> <script type='text/javascript'> var = new swfobject('/jwplayer/player.swf','mpl',640,480,'9'); so.addparam('allowfullscreen','true'); so.addparam('allowscriptaccess','always'); so.addparam('wmode','opaque'); so.addvariable('file',escape('the_video.flv')); so.addvariable('backcolor','111111'); so.addvariable('frontcolor','7fc9eb'); so.addvariable('lightcolor','cd6a28'); so.addvariable('screencolor','000000'); so.addvariable('playlistsize','0'); so.addvariable('skin','/jwplayer/stylish.swf'); so.write('mediaspacex'); </script>
you can force browser show permission prompt using hack:
/** * tries show browser's promt enabling flash * * chrome starting 56 version , edge 15 disabling flash * default. promt user enable flash, suggest send user * flash player download page. browser catch such request * , show promt user: * https://www.chromium.org/flash-roadmap#toc-developer-recommendations * in method forcing such promt navigating user 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) { // in case, when flash not available, try prompt user enable requestflashpermission(); // chrome requires user's click in order allow iframe embeding $(window).one('click', requestflashpermission); }
based on: https://www.chromium.org/flash-roadmap#toc-developer-recommendations
Comments
Post a Comment