Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-vue-screen-capture

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-vue-screen-capture

[![NPM version](https://img.shields.io/npm/v/electron-vue-screen-capture.svg?sanitize=true)](https://www.npmjs.com/package/electron-vue-screen-capture) [![Downloads](https://img.shields.io/npm/dm/electron-vue-screen-capture.svg)](http://badge.fury.io/js/

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

electron-vue-screen-capture

NPM version Downloads

screen capture base on electron & vue

usage

// install
npm install electron-vue-screen-capture -S

// config in vue.config.js
pluginOptions: {
  electronBuilder: {
    builderOptions: {
      extraResources:[{
        from: 'node_modules/electron-vue-screen-capture/dist_electron/bundled/',
        to: './screen-capture'
      }]
    }
  }
}

// use
import { init, start, close, targetWin } from 'electron-vue-screen-capture/src/main/modules/screenCapture.js'
// initial render process
init(win) // your BrowserWindow

// after clicked a btn,show capture window
start(type) // type 'minimum' will hide the targetWin

// after capture finished/cancaled
ipcMain.on('getCaptureData', (e, data) => {
  // base64 for image, if capture was canceled, return false
  if (typeof data === 'string') targetWin.send('getCaptureData', data);
  // after finish deal with image, close capture's window manualy
  close('hide');
});

ipcRenderer.on('screenCaptureAuthFailed', () => {
  // mac ScreenCapture promission failed
  // do something in your BrowserWindow
})

// close capture manualy
close(type)
// type 'refresh' will exit capture's windows and restart
// type 'hide' will hide capture's windows
// otherwise force destory capture's windows

downloads

single version

develop

npm i
npm run serve

mainly achieved features

  1. tested and could be used in electron 8.x ~ 9.X (chromium 80 ~ 83)
  2. support mac & windows platform
  3. get mac's screenCapture promission automatically (after macOS 10.15)
  4. support only fullscreen's capture, window's capture was not supported

optimize

FAQs

Package last updated on 09 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc