tinechat-screenshot

1.0.1 • Public • Published

tinechat-screenshot

region screenshot for electron.

usage

npm install tinechat-screenshot

in mainProcess.js

import { initMain } from 'tinechat-screenshot';

app.on('ready', () => {
  const win = new BrowserWindow();
  initMain(win.webContents);
})

in renderProcess.js

import { screenshot } from 'tinechat-screenshot';
screenshot().then(({ base64 } => {
  console.log(base64);
});

notice

when use in Windows. add the snippet in package.json

...
 "build": {
    ...
    "asarUnpack": [
      "*.exe"
    ],
    ...
 }
...

Package Sidebar

Install

npm i tinechat-screenshot

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

347 kB

Total Files

36

Last publish

Collaborators

  • niuzhiwen