fixed mic

This commit is contained in:
cupcakearmy 2021-06-18 19:09:25 +02:00
parent dc03c1b1ce
commit aa56ad6ce7
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
5 changed files with 11 additions and 4 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.3.0] - 2021-06-17
### Fixed
- Pause on Mic/Camera was not working correctly
## [1.3.0] - 2021-06-10
### Added

View File

@ -11,7 +11,7 @@
"repository": {
"url": "https://github.com/cupcakearmy/unpixel"
},
"version": "1.3.0",
"version": "1.3.1",
"main": "./dist/back/index.js",
"scripts": {
"start": "electron .",

View File

@ -6,6 +6,7 @@ import Settings from './settings'
const exec = promisify(cp.exec)
export async function isCameraActive(): Promise<boolean> {
// Not reliable
if (process.platform === 'darwin') {
// Check number of processes using the camera
const out = await exec(`lsof -n | grep "AppleCamera"`)
@ -42,7 +43,7 @@ export class InputDevicesStatus {
static areCameraOrMicrophoneActive(): boolean {
if (Settings.load('skipOnCameraOrMic')) {
return InputDevicesStatus.status.mic || InputDevicesStatus.status.camera
return InputDevicesStatus.status.mic
}
return false
}

View File

@ -7,7 +7,7 @@ const labels = {
boot: ['Start on boot'],
autoClose: ['Close window after countdown'],
volume: ['Chime Volume'],
skipOnCameraOrMic: ['Pause when Mic or Camera are active'],
skipOnCameraOrMic: ['Pause when Mic is active'],
}
const ranges: Partial<Record<keyof typeof labels, [number, number]>> = {

View File

@ -15,7 +15,7 @@ const Settings = () => {
<Field setting="boot" />
<Field setting="skipOnCameraOrMic" />
<small className="ml4" style={{ position: 'relative', top: '-0.5em' }}>
only on <i>macOS</i>
experimental & only on <i>macOS</i>
</small>
</fieldset>
</form>