Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 #1

Merged
merged 31 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e6d0999
Implement initial project structure
ns-vasilev Oct 6, 2023
7fb846f
Add `.clang-format`
ns-vasilev Oct 9, 2023
0bf10ab
Update `project.yml`
ns-vasilev Oct 9, 2023
dc86d5f
Implement `NVAudioService`
ns-vasilev Oct 9, 2023
d28d8c4
Implement `NVCaptureConfiguration`
ns-vasilev Oct 9, 2023
bb29455
Update `NVCaptureConfiguration`
ns-vasilev Oct 10, 2023
fae7a96
Implement `NVCaptureConfiguration` tests
ns-vasilev Oct 10, 2023
dc8c5e7
Update `OCMock`
ns-vasilev Oct 10, 2023
909d0b5
Add headers to `CaptureKit.h`
ns-vasilev Oct 10, 2023
ec77fbe
Implement `NVCaptureServiceTests`
ns-vasilev Oct 10, 2023
15ace8c
Add pragma marks
ns-vasilev Oct 10, 2023
37ddde6
Generate headers and add comments
ns-vasilev Oct 10, 2023
a9c5b97
Remote duplicates
ns-vasilev Oct 10, 2023
82e70d5
Add `ci.yml`
ns-vasilev Oct 10, 2023
572c6cf
Update `Brewfile`
ns-vasilev Oct 10, 2023
f8ff4e4
Fix a typo in the `project.yml`
ns-vasilev Oct 10, 2023
34fe1db
Add comments to `NVCaptureConfiguration`
ns-vasilev Oct 12, 2023
af94ce9
Rename methods
ns-vasilev Oct 12, 2023
6a4df7f
Update `README.md`
ns-vasilev Oct 12, 2023
becb732
Integrate `TestCov`
ns-vasilev Oct 12, 2023
fa67743
Update `README.md`
ns-vasilev Oct 12, 2023
eea5dd7
Add `codecov.yml`
ns-vasilev Oct 12, 2023
a862ef9
Update `ci.yml`
ns-vasilev Oct 12, 2023
ab098fb
Update `NVAudioService`
ns-vasilev Oct 16, 2023
160d423
Update `CHANGELOG.md`
ns-vasilev Oct 19, 2023
3dbb690
Integrate `danger`
ns-vasilev Oct 19, 2023
ffe9e15
Add templates
ns-vasilev Oct 19, 2023
b64b394
Delete `CaptureKit.md`
ns-vasilev Oct 19, 2023
a0fa8e3
Add a podspec
ns-vasilev Oct 19, 2023
79d9570
Add `Dangerfile`
ns-vasilev Oct 19, 2023
90dc1b3
Update `ci.yml`
ns-vasilev Oct 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
ns-vasilev committed Oct 12, 2023

Verified

This commit was signed with the committer’s verified signature.
ns-vasilev Nikita Vasilev
commit 6a4df7f1c6d10a22e1e6bb4046fab9129e82d39e
91 changes: 90 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,90 @@
# capture-kit
![capture-kit: ](https://raw.githubusercontent.com/space-code/capture-kit/dev/Resources/capture-kit.png)

<h1 align="center" style="margin-top: 0px;">capture-kit</h1>

<p align="center">
<a href="https://github.com/space-code/validator/blob/main/LICENSE"><img alt="Liscence" src="https://img.shields.io/cocoapods/l/service-core.svg?style=flat"></a>
<a href="https://github.com/space-code/capture-kit"><img alt="CI" src="https://github.com/space-code/capture-kit/actions/workflows/ci.yml/badge.svg?branch=main"></a>
</p>

## Description
`capture-kit` is a framework written in Objective-C that provides functions that can be used to capture the contents of a screen.

- [Usage](#usage)
- [Requirements](#requirements)
- [Communication](#communication)
- [Contributing](#contributing)
- [Author](#author)
- [License](#license)

## Usage

1. Create a new instance of `NVCaptureService` that encompasses screen capturing functionality.

```objc
NVCaptureService *captureService = [[NVCaptureService alloc] init];
```

2. Set a delegate to receive recording-related events:

```objc
captureService.delegate = self;
```

3. An optional step: If you want to capture microphone sound, you need to obtain a microphone ID. To do this, create a new instance of `NVAudioService` that provides a list of connected device IDs.

```objc
NVAudioService *audioService = [[NVAudioService alloc] initWithMediaDeviceProvider:[NVMediaDeviceProvider new]];
NSArray<NSString *> *ids = [audioService audioDevicesIDs];
```
You can also check whether an audio device is connected to the system like this:
```objc
BOOL isConnected = [audioService isAudioDeviceConnected:@"<device_id_here>"];
```

4. Start screen capture

```objc
NSRect sampleRect = CGRectMake(0, 0, 1200, 1800);
NSURL *sampleURL = [[NSURL alloc] initWithString:@"file_url"];

[_captureService startRecordingWithAudioDeviceID:@"<device_id_here>"
rect:sampleRect
directDisplayID:kCGDirectMainDisplay
outputFileURL:sampleURL];
```
Also, you can pass a custom capture configuration using ```objc - (void)startRecordingWithConfiguration:deviceID:rect:directDisplayID:outputFileURL:```
5. For pausing, resuming, and cancelling, you can use the following methods:
```objc
- (void)pause
- (void)resume
- (void)stop
```

## Requirements
- macOS 11.0+
- Xcode 14.0

## Communication
- If you **found a bug**, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.

## Contributing
Bootstrapping development environment

```
make bootstrap
```

Please feel free to help out with this project! If you see something that could be made better or want a new feature, open up an issue or send a Pull Request!

## Author
Nikita Vasilev, [email protected]

## License
capture-kit is available under the MIT license. See the LICENSE file for more info.
Binary file added Resources/capture-kit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.