【文件属性】:
文件名称:node-win-desktop-duplication:使用Windows桌面复制API捕获屏幕的库
文件大小:18KB
文件格式:ZIP
更新时间:2021-05-27 12:23:54
C++
Windows桌面节点复制
使用本机插件,它是Windows 8及更高版本的一部分。
安装
npm install windows-desktop-duplication
用法
const { DesktopDuplication } = require ( 'windows-desktop-duplication' ) ;
let dd = new DesktopDuplication ( 0 ) ; // register for screen 0
let frame ;
try {
dd . initialize ( ) ;
frame = dd . getFrame ( ) ;
} catch ( err ) {
console . log ( "An error occured:" , err . message ) ;
process . exit ( 0 ) ;
【文件预览】:
node-win-desktop-duplication-master
----index.js(80B)
----package.json(886B)
----LICENSE(1KB)
----package-lock.json(398B)
----src()
--------getframeasyncworker.cpp(1KB)
--------getframeasyncworker.h(393B)
--------types.h(321B)
--------desktopduplication.h(2KB)
--------desktopduplication.cpp(19KB)
----index.d.ts(3KB)
----examples()
--------capture_thread.js(677B)
--------monitor_count.js(198B)
--------get_frame.js(525B)
--------get_frame_async.js(512B)
----.gitignore(936B)
----lib()
--------DesktopDuplication.js(4KB)
----README.md(4KB)
----.jshintrc(21B)
----binding.gyp(530B)