はじめに
このプラグインのインストール手順と完全なマークダウンガイドを含む設定用質問をコピーする。
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.
インストール
インストールbun add @capgo/capacitor-screen-recorderbunx cap syncインポート
インポートimport { ScreenRecorder } from '@capgo/capacitor-screen-recorder';API オーバービュー
API オーバービュー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 });stop
「停止」タイトルのセクション現在のスクリーン録画を停止します。
アクティブなスクリーン録画を停止し、デバイスのカメラロールまたはギャラリーに動画を保存します。 iOS の場合、システムは録画のプレビューを表示します。 Android の場合、動画は直接ギャラリーに保存されます。
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
await ScreenRecorder.stop();console.log('Recording saved to gallery');真実の源
「真実の源」タイトルのセクションこのページはプラグインの src/definitions.ts公開された API がアップストリームで変更された場合に、再度同期を実行してください。