Skip to content
Discussion options

You must be logged in to vote

Well , I have added this script block in index.html to totally stop the permission part for camera :

 <script>
  function blockCameraAccess() {
  const originalGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
  navigator.mediaDevices.getUserMedia = (...args) => {
    if (args.some(arg => arg.video)) {
      return Promise.reject(new Error('Camera access blocked by user'));
    }
    return originalGetUserMedia(...args);
  }
}

blockCameraAccess();
  </script>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sahil-twinreality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant