캡쳐 및 화면녹화 방지
이 페이지에서는 플레이어 캡쳐/녹화 방지를 설정하는 가이드를 설명합니다.
AndroidiOS
현재 기능은 실제 기기에서만 동작합니다. (시뮬레이터 X)
screenRecordingPrevention
화면 스크린캡쳐 or 화면 녹화를 방지합니다.
- 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 이 필요합니다.