capacitor-screenshot
TypeScript icon, indicating that this package has built-in type declarations

7.2.0 • Public • Published


Screenshot

capacitor-screenshot

Ionic Capacitor plugin for take screenshot


Buy me a coffee

Maintainers

Maintainer GitHub Social LinkedIn
Luan Freitas (ludufre) ludufre @ludufre Luan Freitas

Installation

npm install capacitor-screenshot
ionic cap sync
yarn install capacitor-screenshot
ionic cap sync
pnpm add capacitor-screenshot
ionic cap sync

Configuration

Not needed.

Usage

import { Screenshot } from 'capacitor-screenshot';

...

Screenshot.take().then((ret: { base64: string }) => {
    console.log(ret.base64); // or `data:image/png;base64,${ret.base64}`
});

// Or save to disk and get file path and web path
Screenshot.take({saveToDisk: true}).then((ret: { base64: string; path: string; webPath: string }) => {
    console.log(ret);
});

Package Sidebar

Install

npm i capacitor-screenshot

Weekly Downloads

1,031

Version

7.2.0

License

MIT

Unpacked Size

25.8 kB

Total Files

24

Last publish

Collaborators

  • ludufre