Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't disable the built in flash player plugin #6216

Closed
malacca opened this issue Oct 19, 2017 · 9 comments
Closed

doesn't disable the built in flash player plugin #6216

malacca opened this issue Oct 19, 2017 · 9 comments
Assignees

Comments

@malacca
Copy link

malacca commented Oct 19, 2017

nwjs v0.26.0, windows 32bit and 64bit

get same problem like #4257

@Christywl
Copy link
Contributor

Do you mean "plugin": false in package.json doesn't disable flash player plugin?

  "webkit":{
    "plugin": false
  }

This works fine for me on Windows with nwjs-sdk-v0.26.0.

{
  "name": "test",
  "main": "http://get.adobe.com/flashplayer/about/",
  "webkit":{
    "plugin": false
  }
}

@malacca
Copy link
Author

malacca commented Oct 20, 2017

no

i get chrome "PepperFlash" dir and put it in app dir.

package.json enable plugin
{ "webkit":{ "plugin": true } }

now, flash player is available, but when i use chrome api chrome.contentSettings (https://developer.chrome.com/extensions/contentSettings)

chrome.contentSettings.plugins.set({
primaryPattern: '<all_urls>',
resourceIdentifier: {
  id: 'adobe-flash-player'
},
'block'
});

flash player is still available.

just like #4257

i want to make a mini browser that support enable/disable flash plugin in app.

only get chrome.contentSettings api , Is there any other way to disable/enable flash plugin on runtime

@malacca
Copy link
Author

malacca commented Oct 20, 2017

if found electron webview api is so easy :(

https://electron.atom.io/docs/api/webview-tag/#plugins

@Christywl
Copy link
Contributor

@malacca , using chrome.contentSettings, there is no response when I click the link:
index.html:

<script>
  chrome.contentSettings.plugins.set({
    primaryPattern: '<all_urls>',
    resourceIdentifier: {
      id: 'adobe-flash-player'
    },
    setting: "block"
  });
</script>

<a href="http://get.adobe.com/flashplayer/about/">flash</a>

package.json:

{
    "name": "test",
	"main": "index.html",
	"webkit":
	{
	  "plugin":true
	}
}

If I change block to allow, the flash could be loaded successfully.

@malacca
Copy link
Author

malacca commented Oct 23, 2017

yes, the response was canceled, but it don't mean flash is bock.

you can test

<script>
  chrome.contentSettings.plugins.set({
    primaryPattern: '<all_urls>',
    resourceIdentifier: {
      id: 'adobe-flash-player'
    },
    setting: "block"
  });
</script>
<a href="http://www.flashls.org/latest/examples/chromeless/">flash</a>

there is a flash player, and it still work

@malacca
Copy link
Author

malacca commented Oct 23, 2017

the link may be error, another link

https://www.hlsplayer.net/

you can input m3u8 url: http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8

the flash player work fine, it not block

@Christywl
Copy link
Contributor

Thanks for your info, I can reproduce this issue now, the flash player still work fine after setting block.

@malacca
Copy link
Author

malacca commented Oct 23, 2017

in fact, i use this in webview tag, i hope you can test it in webview tag after fixed :)
like

<script>
  chrome.contentSettings.plugins.set({
    primaryPattern: '<all_urls>',
    resourceIdentifier: {
      id: 'adobe-flash-player'
    },
    setting: "block"
  });
</script>
<webview src="https://www.hlsplayer.net/"></webview>

and i found another webwiew problem, I do not know if it is a bug, i will open a new issue :)

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants