Mulai
Copas prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
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.
Pasang
Bagian berjudul “Pasang”bun add @capgo/capacitor-screen-recorderbunx cap syncimport { ScreenRecorder } from '@capgo/capacitor-screen-recorder';API Ringkasan
Judul Bagian “API Ringkasan”start
Judul Bagian “Mulai”Mulai merekam layar perangkat.
Mengaktifkan merekam layar dengan pilihan merekam suara. Pengguna akan diminta untuk memberikan izin merekam layar jika belum pernah memberikan izin. Pada iOS, UI merekam sistem akan ditampilkan. Pada Android, merekam dimulai setelah izin diberikan.
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
// Start recording without audioawait ScreenRecorder.start();
// Start recording with audioawait ScreenRecorder.start({ recordAudio: true });Berhenti merekam layar saat ini.
Menghentikan merekam layar aktif dan menyimpan video ke galeri kamera perangkat. Pada iOS, sistem akan menampilkan pratinjau merekam. Pada Android, video disimpan langsung ke galeri.
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';
await ScreenRecorder.stop();console.log('Recording saved to gallery');Sumber Kebenaran
Sumber KebenaranHalaman ini dibuat dari plugin’s src/definitions.ts. Re-run sinkronisasi ketika publik API berubah di atas.