Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/is-camera-on
Check if the built-in Mac camera is on
https://github.com/sindresorhus/is-camera-on
camera macos swift swift-package swift-package-manager
Last synced: about 1 month ago
JSON representation
Check if the built-in Mac camera is on
- Host: GitHub
- URL: https://github.com/sindresorhus/is-camera-on
- Owner: sindresorhus
- License: mit
- Created: 2017-04-24T06:59:14.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T20:10:20.000Z (about 1 year ago)
- Last Synced: 2024-04-14T07:00:50.104Z (7 months ago)
- Topics: camera, macos, swift, swift-package, swift-package-manager
- Language: Swift
- Homepage:
- Size: 6.84 KB
- Stars: 137
- Watchers: 8
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# 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`:
```swift
.package(url: "https://github.com/sindresorhus/is-camera-on", from: "2.0.2")
```[Or add the package in Xcode.](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)
## Usage
```swift
import IsCameraOnprint(isCameraOn())
//=> true
```## Related
- [node-is-camera-on](https://github.com/sindresorhus/node-is-camera-on) - Node.js wrapper for this module
- [is-camera-on-cli](https://github.com/sindresorhus/is-camera-on-cli) - CLI for this module
- [macos-wallpaper](https://github.com/sindresorhus/macos-wallpaper) - Manage the desktop wallpaper
- [do-not-disturb](https://github.com/sindresorhus/do-not-disturb) - Control the macOS `Do Not Disturb` feature
- [More…](https://github.com/search?q=user%3Asindresorhus+language%3Aswift+archived%3Afalse&type=repositories)