スタートガイド
インストール手順と、このプラグインの完全なMarkdownガイドを含むセットアッププロンプトをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-screen-recorder`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/screen-recorder/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」セクションAIアシストによるセットアップでプラグインをインストールできます。以下のコマンドを使用して、お使いのAIツールに Capgo のスキルを追加してください:
bunx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用します:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-screen-recorder` plugin in my project.手動セットアップを希望する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム別の手順に従ってください:
bun add @capgo/capacitor-screen-recorderbunx cap syncインポート
「インポート」セクションimport { ScreenRecorder } from '@capgo/capacitor-screen-recorder';クイックスタート
「クイックスタート」セクションimport { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
// Start recording without audioawait ScreenRecorder.start();
// Start recording with audioawait ScreenRecorder.start({ recordAudio: true });
// Start recording as MOV on iOSawait ScreenRecorder.start({ format: 'mov' });例: stop
「例:stop」セクションimport { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
await ScreenRecorder.stop();console.log('Recording saved to gallery');よくある落とし穴
「よくある落とし穴」セクション- リスナー: 画面がアンマウントされたらハンドルを削除します。
- ネイティブ同期: 実行
bunx cap syncプラグインのアップグレード後。 - 信頼できる情報源: 信頼
src/definitions.tsGitHub リポジトリ内。
API の概要
「API 概要」セクションstart
「start」セクションデバイス画面の録画を開始します。
画面録画を開始します(音声キャプチャはオプション)。 画面録画の権限がまだ付与されていない場合は、ユーザーに許可を求める プロンプトが表示されます。iOSではシステムの録画UIが表示され、Androidでは 権限が許可されるとすぐに録画が開始されます。
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
// Start recording without audioawait ScreenRecorder.start();
// Start recording with audioawait ScreenRecorder.start({ recordAudio: true });現在の画面録画を停止します。
実行中の画面録画を停止し、動画をデバイスのカメラロールまたはギャラリーに保存します。iOSでは、システムが録画のプレビューを表示します。Androidでは、動画は直接ギャラリーに保存されます。
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
await ScreenRecorder.stop();console.log('Recording saved to gallery');Source of Truth
「Source Of Truth」セクションこのページはプラグインの src/definitions.tsから生成されています。upstream で公開 API が変更されたら、再度 sync を実行してください。
Getting Startedの続きを進める
「Getting Started からの続き」セクション使用している場合 スタートガイド ネイティブメディアとインターフェースの挙動を計画するには、次と連携させてください @capgo/capacitor-screen-recorder の使い方 @capgo/capacitor-screen-recorder を使用してネイティブ機能を利用する場合、 @capgo/capacitor-live-activities の使用 @capgo/capacitor-live-activities の使用におけるネイティブ機能については、 @capgo/capacitor-live-activities @capgo/capacitor-live-activities の実装の詳細については、 @capgo/capacitor-video-playerの使用方法 @capgo/capacitor-video-player を使用する際のネイティブ機能については、 @capgo/capacitor-video-player @capgo/capacitor-video-player. の実装の詳細については