컨텐츠로 건너뛰기

시작하기

설치

설치
터미널 창
bun add @capgo/capacitor-screen-recorder
bunx cap sync

수입

수입
import { ScreenRecorder } from '@capgo/capacitor-screen-recorder';

API 개요

API 개요

start

시작

디바이스 화면 녹화 시작.

디바이스 화면 녹화를 시작합니다. optional 오디오 캡처가 가능합니다. 사용자는 화면 녹화 권한을 부여하지 않은 경우 권한을 부여하도록 유도됩니다. iOS에서 시스템 녹화 UI가 표시됩니다. Android에서 권한이 부여된 후 녹화가 시작됩니다.

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

현재 화면 녹화 중지.

활성화된 화면 녹화를 중지하고 비디오를 기기 내의 카메라 롤 또는 갤러리에 저장합니다. iOS에서 시스템은 녹화의 미리보기 화면을 표시하고 Android에서는 비디오를 직접 갤러리에 저장합니다.

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

이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 동기화 하십시오.