Documentation Index

Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

画面のキャプチャと録画の防止

Prev Next

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が必要になる場合があります。