mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2024-12-21 23:56:28 +00:00
fixed mic
This commit is contained in:
parent
dc03c1b1ce
commit
aa56ad6ce7
@ -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
|
||||
|
@ -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 .",
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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]>> = {
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user