mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2024-12-22 08:06:33 +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/),
|
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).
|
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
|
## [1.3.0] - 2021-06-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/cupcakearmy/unpixel"
|
"url": "https://github.com/cupcakearmy/unpixel"
|
||||||
},
|
},
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"main": "./dist/back/index.js",
|
"main": "./dist/back/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
|
@ -6,6 +6,7 @@ import Settings from './settings'
|
|||||||
const exec = promisify(cp.exec)
|
const exec = promisify(cp.exec)
|
||||||
|
|
||||||
export async function isCameraActive(): Promise<boolean> {
|
export async function isCameraActive(): Promise<boolean> {
|
||||||
|
// Not reliable
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
// Check number of processes using the camera
|
// Check number of processes using the camera
|
||||||
const out = await exec(`lsof -n | grep "AppleCamera"`)
|
const out = await exec(`lsof -n | grep "AppleCamera"`)
|
||||||
@ -42,7 +43,7 @@ export class InputDevicesStatus {
|
|||||||
|
|
||||||
static areCameraOrMicrophoneActive(): boolean {
|
static areCameraOrMicrophoneActive(): boolean {
|
||||||
if (Settings.load('skipOnCameraOrMic')) {
|
if (Settings.load('skipOnCameraOrMic')) {
|
||||||
return InputDevicesStatus.status.mic || InputDevicesStatus.status.camera
|
return InputDevicesStatus.status.mic
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ const labels = {
|
|||||||
boot: ['Start on boot'],
|
boot: ['Start on boot'],
|
||||||
autoClose: ['Close window after countdown'],
|
autoClose: ['Close window after countdown'],
|
||||||
volume: ['Chime Volume'],
|
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]>> = {
|
const ranges: Partial<Record<keyof typeof labels, [number, number]>> = {
|
||||||
|
@ -15,7 +15,7 @@ const Settings = () => {
|
|||||||
<Field setting="boot" />
|
<Field setting="boot" />
|
||||||
<Field setting="skipOnCameraOrMic" />
|
<Field setting="skipOnCameraOrMic" />
|
||||||
<small className="ml4" style={{ position: 'relative', top: '-0.5em' }}>
|
<small className="ml4" style={{ position: 'relative', top: '-0.5em' }}>
|
||||||
only on <i>macOS</i>
|
experimental & only on <i>macOS</i>
|
||||||
</small>
|
</small>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user