https://github.com/cap-go/capacitor-screen-recorder
Capacitor plugin to record the screen of the phone in native
https://github.com/cap-go/capacitor-screen-recorder
capacitor capacitor-plugin ionic
Last synced: about 1 month ago
JSON representation
Capacitor plugin to record the screen of the phone in native
- Host: GitHub
- URL: https://github.com/cap-go/capacitor-screen-recorder
- Owner: Cap-go
- License: mpl-2.0
- Created: 2021-11-12T04:22:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-04-06T06:21:58.000Z (2 months ago)
- Last Synced: 2026-04-06T08:41:19.259Z (2 months ago)
- Topics: capacitor, capacitor-plugin, ionic
- Language: Swift
- Homepage: https://capgo.app
- Size: 1.65 MB
- Stars: 22
- Watchers: 2
- Forks: 11
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
Record device's screen
## Documentation
The most complete doc is available here: https://capgo.app/docs/plugins/screen-recorder/
## Compatibility
| Plugin version | Capacitor compatibility | Maintained |
| -------------- | ----------------------- | ---------- |
| v8.\*.\* | v8.\*.\* | ✅ |
| v7.\*.\* | v7.\*.\* | On demand |
| v6.\*.\* | v6.\*.\* | ❌ |
| v5.\*.\* | v5.\*.\* | ❌ |
> **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
## Install
```bash
npm install @capgo/capacitor-screen-recorder
npx cap sync
```
## IOS
add NSPhotoLibraryUsageDescription in your info.plist
## Android
increase project's minSdk version to 23, it's required by the dependency HBRecorder
Add these permissions in your `AndroidManifest.xml`:
```xml
```
### Add JitPack Repository
Add JitPack repository to your Android app's build.gradle (android/app/build.gradle):
```gradle
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io/' }
}
}
```
### Variables
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
- `$kotlinVersion` version of `org.jetbrains.kotlin:kotlin-stdlib-jdk7` (default: `1.7.21`)
If you have compilation issue `Duplicate class androidx.lifecycle.ViewModelLazy`
i found in this the solution who worked for me:
https://stackoverflow.com/questions/73406969/duplicate-class-androidx-lifecycle-viewmodellazy-found-in-modules-lifecycle-view
Add this
```
configurations {
all {
exclude group: 'androidx.lifecycle', module: 'lifecycle-runtime-ktx'
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}
an
```
line 2 in file `android/app/build.gradle`
## Configuration
No configuration required for this plugin.
## API
* [`start(...)`](#start)
* [`stop()`](#stop)
* [`getPluginVersion()`](#getpluginversion)
Capacitor Screen Recorder Plugin for recording the device screen.
Allows you to capture video recordings of the screen with optional audio.
### start(...)
```typescript
start(options?: { recordAudio?: boolean | undefined; } | undefined) => Promise
```
Start recording the device screen.
Initiates screen recording with optional audio capture. The user will be
prompted to grant screen recording permissions if not already granted.
On iOS, the system recording UI will be displayed. On Android, the recording
starts immediately after permission is granted.
| Param | Type | Description |
| ------------- | --------------------------------------- | --------------------------------- |
| **`options`** | { recordAudio?: boolean; } | - Recording configuration options |
**Since:** 1.0.0
--------------------
### stop()
```typescript
stop() => Promise
```
Stop the current screen recording.
Stops the active screen recording and saves the video to the device's
camera roll or gallery. On iOS, the system will show a preview of the
recording. On Android, the video is saved directly to the gallery.
**Since:** 1.0.0
--------------------
### getPluginVersion()
```typescript
getPluginVersion() => Promise<{ version: string; }>
```
Get the native Capacitor plugin version.
**Returns:** Promise<{ version: string; }>
**Since:** 1.0.0
--------------------
