The following code embedding a Flash animation into an HTML document using SWFObject displays only the alternative content. Why?
Chrome's since version 55 does not initialize the variables that swfobject needs to detect if Flash is installed. You can apply primitive patch to swfobject js to skip hasPlayerVersion check:
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ try { // create SWF
var obj = createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}
callbackObj.success = true;
callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
+ } catch (e) { // show alternative content
setVisibility(replaceElemIdStr, true);
}