Skip to content

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

Terminal window
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-screen-recorder` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

Terminal window
bun add @capgo/capacitor-screen-recorder
bunx cap sync
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';

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.

import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
// Start recording without audio
await ScreenRecorder.start();
// Start recording with audio
await ScreenRecorder.start({ recordAudio: true });

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.

import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
await ScreenRecorder.stop();
console.log('Recording saved to gallery');

This page is generated from the plugin’s src/definitions.ts. Re-run the sync when the public API changes upstream.

If you are using Getting Started to plan native media and interface behavior, connect it with Using @capgo/capacitor-screen-recorder for the native capability in Using @capgo/capacitor-screen-recorder, Using @capgo/capacitor-live-activities for the native capability in Using @capgo/capacitor-live-activities, @capgo/capacitor-live-activities for the implementation detail in @capgo/capacitor-live-activities, Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player, and @capgo/capacitor-video-player for the implementation detail in @capgo/capacitor-video-player.