Media devices

This file contains wrapper for MediaDevices.enumerateDevices

The goal is to prevent fingerprinting by modifying return value of enumerateDevices.

This wrapper operates with three levels of protection:

  • (0) - return promise with suffled array
  • (1) - return promise with shuffled array with additional 0-4 fake devices
  • (2) - return empty promise

The shuffling approach is inspired by the algorithms created by Brave Software available here.