flash - 构建后,电子闪光无法工作
问题描述
当我使用时npm run dev
,电子闪光灯可以工作。但是我为win10构建了程序.exe
,电子闪光灯无法工作,我该如何处理?我使用 electron-vue 框架,这是我的电子配置:
/src/main/index.js
const pepflashplayer = app.getPath('pepperFlashSystemPlugin');
app.commandLine.appendSwitch('ppapi-flash-path', pepflashplayer);
app.commandLine.appendSwitch('ppapi-flash-version', '30.0.0.154');
mainWindow = new BrowserWindow({
height: 563,
useContentSize: true,
width: 1250,
webPreferences:{
plugins : true
}
})
src/renderer/components/XX.vue
<webview :src="**.swf" plugins autosize
style="height:100%;margin:0 auto" id="webFlash">
</webview>
解决方案
但是我为 Win 10 构建了程序
.exe
,Electron Flash 无法工作。
我该如何处理?
我不使用 Electron,所以我不知道这是否能解决您的问题,但通常您不会直接在 Pepper API 浏览器中加载 SWF 文件。尝试确保您src
的html文件本身具有embed
所需 Flash SWF 文件的代码。
如果XX.vue
是加载页面内容的...
<webview :src="test.html" plugins autosize
style="height:100%;margin:0 auto" id="webFlash">
</webview>
test.html
代码看起来像这样的地方:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<body>
<embed src="yourFile.swf" width="800" height="600">
</body>
</html>
让我知道事情的后续。
推荐阅读
- batch-file - 如何使用 cmd.exe 批处理文件(for 循环)将 JSON 语法转换为另一种语法
- javascript - TypeError:food.map 不是 Reactjs 中的函数
- c# - EF core gives error after adding a function inside "Where" lambda expression [EF-CORE 3.1]
- javascript - export html to PDF in JSPDF
- sql - Masking ID and Name in SQL
- android - Google Play Internal Testing App Rejected
- powershell - PowerShell - get-hotfix on multiple servers - error handling
- unity3d - Unity Rig 重量不会通过动画剪辑立即更新
- elasticsearch - 如何在无痛脚本中深度克隆对象字段
- ionic-framework - 每当我登录我的应用程序时,Ionic 框架(网络)都显示没有互联网连接