node-webkit
历史版本下载地址: https://npm.taobao.org/mirrors/nwjs
项目有个需求要求node-webkit集成Flash插件,node-webkit 支持 NPAPI 规范的插件
步骤一:启用插件功能
首先在你前端项目中的 package.json 中加入如下配置来启用插件功能
"webkit": {
"plugin": true
}
添加完毕,你的 package.json 大概是这样的
{
"main": "index.html",
"name": "nw-demo",
"description": "demo app of node-webkit",
"version": "0.0.1",
"window": {
"title": "node-webkit demo",
"toolbar": true,
"frame": true,
"width": 1000,
"height": 700,
"position": "center",
"min_width": 400,
"min_height": 200,
"max_width": 1920,
"max_height": 1080,
"resizable": true
},
"webkit": {
"plugin": true
}
}
步骤二:导入 Flash 插件
根据 在nw.js中显示Flash 中提到 的 将 Chrome 安装目录下的 PepperFlash 这个文件夹复制到了nw.js 的目录中。
将 Chrome 中位于 Google\Chrome\Application 下的 PepperFlash 文件夹提取出来,放入 nw.exe同 目录下。
可用PepperFlash插件下载地址:https://download.csdn.net/download/tichangde/10421867
参考:https://www.cphayim.me/blog/use-flash-in-nwjs.html
本文介绍如何在Node-WebKit应用中集成Flash插件。通过修改package.json启用插件功能,并将Chrome的PepperFlash文件夹复制到nw.js目录下完成集成。
373

被折叠的 条评论
为什么被折叠?



