Classic/VPC 환경에서 이용 가능합니다.
플레이어에서 캡처 및 화면 녹화 방지 설정 방법을 설명합니다.
지원 플랫폼: Android iOS
참고
현재 기능은 실제 기기에서만 동작합니다. (시뮬레이터 미지원)
screenRecordingPrevention
화면 캡처 또는 화면 녹화를 방지하려면 screenRecordingPrevention 옵션을 설정해야 합니다.
- iOS에서는 캡처 결과물이 블랙 스크린으로 처리됩니다.
- Android에서는 '캡처를 할 수 없습니다.' 토스트 메시지와 함께 캡처가 방지됩니다.
const playerRef = useRef(null);
return (
<VpePlayer
ref={playerRef}
options={{
playlist: [
{ file: 'https://CDN도메인/example_video_01.mp4' },
],
screenRecordingPrevention: true, // 화면 캡처 및 녹화 방지
}}
/>
);
app.json 설정
화면 캡처 및 화면 녹화 방지를 위한 설정을 추가해야 합니다.
{
"expo": {
"plugins": [
[
"react-native-capture-protection",
{
"captureType": "fullMediaCapture"
}
]
]
}
}
참고
상황에 따라 prebuild 혹은 pod install이 필요합니다.