Add apt repo to readme

This commit is contained in:
smartfridge 2022-12-26 18:28:15 +01:00
parent 730a88681a
commit 55fd573599
2 changed files with 21 additions and 8 deletions

View file

@ -1,9 +1,10 @@
import {BrowserWindow, desktopCapturer, ipcMain, session, shell} from "electron";
import {BrowserWindow, desktopCapturer, DesktopCapturerSource, ipcMain, session, shell} from "electron";
import path from "path";
import {iconPath} from "../main";
var capturerWindow: BrowserWindow;
function registerCustomHandler() {
session.defaultSession.setDisplayMediaRequestHandler(async (request, callback) => {
console.log(request);
const sources = await desktopCapturer.getSources({
types: ["screen", "window"]
});
@ -23,10 +24,10 @@ function registerCustomHandler() {
}
});
ipcMain.once("selectScreenshareSource", (event, id, name) => {
console.log(sources[id]);
console.log(id);
//console.log(sources[id]);
//console.log(id);
capturerWindow.close();
var result = {id, name};
var result = {id, name, width: 9999, height: 9999};
callback({video: result});
});
capturerWindow.loadURL(`file://${__dirname}/picker.html`);