在电子方面,可以在开发环境中使用ckplayer播放RTMP。打包后,它显示:无法加载插件

时间:2019-07-11 10:10:17

标签: javascript rtmp

环境:window10

版本:

"ue-electron": "^1.0.6",
"Electron" : "^ 2.0.4",
"Electron - builder", "^ 20.19.2"
// load flash into eletron, and see the loaded plugins in navigator.plugins

Let pluginName
Switch (the process of platform) {
   Case 'win32:
      PluginName = 'pepflashplayer64_32_0_0_207. DLL'
   break
   Case 'Darwin:
      PluginName = 'PepperFlashPlayer. Plugin'
   break
   Case 'Linux' :
     PluginName = 'libpepflashplayer. So'
   break
}
Const flashPath = path. Resolve (arbitration name, '.. /.. / plugins/flash/' + pluginName)
App.com mandLine. AppendSwitch (' ppapi - flash - path, flashPath)
App.com mandLine. AppendSwitch (' ppapi - flash - the version of ', '32.0.0.207')

根据正式文件,我们已尝试许可。 SWF文件在闪存中,但是失败了,可能是因为。 SWF是一个远程链接,并且nw-flash-trust只能在本地许可。 SWF,但ckplayer不支持本地。 SWF文件

/ / authorization SWF
Const flashTrust = the require (' nw - flash - trust)
Const appName = "*"
Const trustManager = flashTrust. InitSync (appName)
TrustManager. Add (path. Join (__dirname, '.. ', '.. ', 'static', 'ckplayer. SWF'))

console.log (trustManager. List ())

我们希望电子包装后RTMP可以正常播放。有什么解决办法吗?

0 个答案:

没有答案