1.0.1 • Published 4 years ago
tinechat-screenshot v1.0.1
tinechat-screenshot
region screenshot for electron.
usage
npm install tinechat-screenshotin 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"
    ],
    ...
 }
...