:spark: 支持系统截屏功能

This commit is contained in:
muwoo
2023-04-04 11:13:38 +08:00
parent 9ee8d78b1b
commit 2cd70bd386
12 changed files with 197 additions and 66 deletions

View File

@@ -113,6 +113,13 @@ window.rubick = {
setFeature(feature) {
return ipcSendSync('setFeature', { feature });
},
screenCapture(cb) {
typeof cb === 'function' &&
(window.rubick.hooks.onScreenCapture = ({ data }) => {
cb(data);
});
ipcSendSync('screenCapture');
},
removeFeature(code) {
return ipcSendSync('removeFeature', { code });
},