Go to file
Sindre Sorhus 66b6c8a035 Minor tweaks 2022-09-23 00:19:01 +07:00
Sources/IsCameraOn Minor tweaks 2022-09-23 00:19:01 +07:00
.editorconfig Init 2017-04-24 14:03:44 +07:00
.gitattributes Upgrade to Swift 5.5 2022-01-10 12:38:53 +07:00
.gitignore Upgrade to Swift 5.5 2022-01-10 12:38:53 +07:00
Package.swift Minor tweaks 2022-09-23 00:19:01 +07:00
license Upgrade to Swift 5.5 2022-01-10 12:38:53 +07:00
readme.md Minor tweaks 2022-09-23 00:19:01 +07:00

readme.md

is-camera-on

Check if the built-in Mac camera is on

The camera is commonly known as FaceTime HD or iSight.

This module can be useful to check if the camera is already in use or notify you if it's turned on when you didn't intend it to be.

Requirements

macOS 10.13+

Install

Add the following to Package.swift:

.package(url: "https://github.com/sindresorhus/is-camera-on", from: "2.0.2")

Or add the package in Xcode.

Usage

import IsCameraOn

print(isCameraOn())
//=> true