puppeteer-extra-plugin-flash

Allow flash on all sites without user interaction.

Usage no npm install needed!

<script type="module">
  import puppeteerExtraPluginFlash from 'https://cdn.skypack.dev/puppeteer-extra-plugin-flash';
</script>

README

puppeteer-extra-plugin-flash

A plugin for puppeteer-extra.

Install

yarn add puppeteer-extra-plugin-flash

Changelog

v2.2.5

  • Improved: Fixes flash content in newer Chrome versions (76+) (#133, thanks @Niek)

API

Table of Contents

Plugin

Extends: PuppeteerExtraPlugin

Allow flash on all sites without user interaction.

Note: The flash plugin is not working in headless mode.

Note: When using the default Chromium browser pluginPath and pluginVersion must be specified (stated in chrome://version/).

Note: Unfortunately this doesn't seem to enable flash on incognito pages, see this gist for a workaround using management policies.

Type: function (opts)

  • opts Object Options (optional, default {})
    • opts.allowFlash boolean Whether to allow flash content or not (optional, default true)
    • opts.pluginPath boolean Flash plugin path (optional, default null)
    • opts.pluginVersion boolean Flash plugin version (9000 is high enough for Chrome not to complain) (optional, default 9000)

Example:

const puppeteer = require('puppeteer-extra')
puppeteer.use(require('puppeteer-extra-plugin-flash')())
;(async () => {
  const browser = await puppeteer.launch({ headless: false })
  const page = await browser.newPage()
  await page.goto('http://ultrasounds.com', { waitUntil: 'domcontentloaded' })
})()