基于 Electron 开发即时通讯 APP,截图功能后期势必成为一个刚需的功能。Webkit 中的 desktopCapture API 只能截取当前窗口的画面,用户的实际需求还是需要全屏选取范围截取。如果需要一个跨平台的插件实现,可能需要使用原生开发出一个截图应用,然后再暴露给 Electron 调用。
screencapture -h screencapture: illegal option -- h usage: screencapture [-icMPmwsWxSCUtoa] [files] -c force screen capture to go to the clipboard -b capture Touch Bar - non-interactive modes only -C capture the cursor as well as the screen. only in non-interactive modes ... ...
Change the application template (49f20f4) - @foghina * Plugins which pass activity reference in the constructor need to be updated to extend ReactContextBaseJavaModule use getCurrentActivity to get the activity reference. This change is backward compatible. * Apps need to be migrated to use the latest template