Win 10 Universal App with Cordova trying to load flash

a 夏天 提交于 2019-12-18 21:14:20

问题


I'm building a cross-platform Cordova app with Visual Studio 2015 and tools for Apache Cordova. Therefore I'm using the Blank Cordova App (with TypeScript) from Tools for Apache Cordova. Everything seems to work fine, except there is a strange error in the JavaScript Console when running the App on Windows 10:

APPHOST9603: "Can’t load the ActiveX plug-in that has the class ID "{D27CDB6E-AE6D-11CF-96B8-444553540000}". Apps can't load ActiveX controls."

This is kind of strange because I'm not unsing any ActiveX plug-in. At least not knowingly... The error is also only visible when running the app on Windows.

Googling the UID brought me here: It is some sort of configuration for Shockwave Flash, which I'm not using either.

One can reproduce the error by creating a new project with the template, changing the desired Windows platform in the config.xml to Windows 10 and starting debugging on a local Windows 10 PC.

Do you have any idea on how to resolve this error? Might this be a bug?

Edit: Same problem here.

Edit: Here is the initially created index.html:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
    <title>BlankCordovaApp1</title>

    <link href="css/index.css" rel="stylesheet" />
</head>
<body>
    <div class="app">
        <p id="deviceready" class="event">Connecting to Device</p>
    </div>

    <script src="cordova.js"></script>
    <script src="scripts/platformOverrides.js"></script>
    <script src="scripts/appBundle.js"></script>
</body>
</html>

回答1:


MSDN Says (https://msdn.microsoft.com/en-us/library/windows/apps/jj860457.aspx):

Windows Runtime apps using JavaScript don't support custom Microsoft ActiveX controls. If you need a UI control, use an HTML control, a Windows Library for JavaScript control, or create your own custom WinJS control. If you need to perform custom logic, create a custom Windows Runtime object instead.

It seems like in your frame, the plug-in ActiveX is used. If you are referencing a webpage and if the webpage is using shockwave flash, it might cause the problem. According to MSDN, it is not possible display a page which contains ActiveX plugin in Windows. Since you are not providing a code, I cannot exactly specify the reason, but this is my best guess.




回答2:


Simple answer: You can't use Flash player in that environment.

Reason: You can not use ActiveX components from Windows Store apps.



来源:https://stackoverflow.com/questions/35840922/win-10-universal-app-with-cordova-trying-to-load-flash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!