2
votes

How to add plugins like flash and java to a node-webkit app?

I have an iframe on my node-webkit app and when I view a page that uses flash the page won't load.

Any ideas?

UPDATE 1

According to the docs

To see whether your plugins are loaded, you can use navigator.plugins in Developer Tools' console.

Your application can also use navigator.plugins. (For example, it's possible to warn the user about a missing plugin or to use a workaround.)

console.log(navigator.plugins) returns that Flash plugin is available. So what's wrong here?

UPDATE 2

Somehow the plugins are now suddenly working, just make sure that the clients system has the plugins you need, or you can packaged it with your app.

Still having problems though, like how to tell your app which plugin to use.

1

1 Answers

1
votes

There are a couple ways to enable plugins:

1) Add the WebKit plugin directive to your package.json:

"webkit": {
  "plugin": true
}

This will give your app access to any browser plugins the user already has installed in their browser.

2) Add the plugin file (extension .plugin) to the plugins/ folder at the root of your project. This will package the plugin with your application, so that the user does not have to have them already installed when they launch your app.

More information is available in the node-webkit wiki.