From aa56ad6ce7dc6a98d04f461fb099d07cf0eefb58 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 18 Jun 2021 19:09:25 +0200 Subject: [PATCH] fixed mic --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/back/utils.ts | 3 ++- src/front/settings/Field.tsx | 2 +- src/front/settings/Settings.tsx | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a902cd..521ee77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index 83de229..823adfa 100644 --- a/package.json +++ b/package.json @@ -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 .", diff --git a/src/back/utils.ts b/src/back/utils.ts index 81d7b54..1cd7d41 100644 --- a/src/back/utils.ts +++ b/src/back/utils.ts @@ -6,6 +6,7 @@ import Settings from './settings' const exec = promisify(cp.exec) export async function isCameraActive(): Promise { + // 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 } diff --git a/src/front/settings/Field.tsx b/src/front/settings/Field.tsx index 9df8ef2..3258328 100644 --- a/src/front/settings/Field.tsx +++ b/src/front/settings/Field.tsx @@ -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> = { diff --git a/src/front/settings/Settings.tsx b/src/front/settings/Settings.tsx index 30131f5..e465e10 100644 --- a/src/front/settings/Settings.tsx +++ b/src/front/settings/Settings.tsx @@ -15,7 +15,7 @@ const Settings = () => { - only on macOS + experimental & only on macOS