(feat): improve mobile
(feat): add camera sharing (fix): vite tauri connection (fix): methanium/ui theme not applied to call popout
This commit is contained in:
parent
b5ce3c554d
commit
62aaa7c01d
31 changed files with 1915 additions and 859 deletions
|
|
@ -95,7 +95,11 @@
|
|||
"target": [
|
||||
"dmg"
|
||||
],
|
||||
"icon": "build/icons/icon.icns"
|
||||
"icon": "build/icons/icon.icns",
|
||||
"extendInfo": {
|
||||
"NSCameraUsageDescription": "Tensamin uses your camera when you choose to share it in a call.",
|
||||
"NSMicrophoneUsageDescription": "Tensamin uses your microphone for calls and shared audio."
|
||||
}
|
||||
},
|
||||
"publish": null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,6 +180,29 @@ function registerDisplayMediaHandler() {
|
|||
);
|
||||
}
|
||||
|
||||
function registerMediaPermissionHandler() {
|
||||
const isTrustedRenderer = (url: string) => {
|
||||
try {
|
||||
const parsed = new URL(url);
|
||||
return parsed.protocol === "file:";
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
session.defaultSession.setPermissionCheckHandler(
|
||||
(_webContents, permission, requestingOrigin) =>
|
||||
permission === "media" && isTrustedRenderer(requestingOrigin),
|
||||
);
|
||||
session.defaultSession.setPermissionRequestHandler(
|
||||
(_webContents, permission, callback, details) => {
|
||||
callback(
|
||||
permission === "media" && isTrustedRenderer(details.requestingUrl),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function registerIpc() {
|
||||
verboseLog("registering ipc handlers");
|
||||
|
||||
|
|
@ -360,6 +383,7 @@ async function start() {
|
|||
verboseLog("app ready");
|
||||
registerIpc();
|
||||
registerDisplayMediaHandler();
|
||||
registerMediaPermissionHandler();
|
||||
initTray(() => mainWindow);
|
||||
await createWindow();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue