This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 971
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7871 from brave/fix/7462
block media device enumeration when fingerprinting protection is on
- Loading branch information
Showing
3 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<body> | ||
<div id='results'></div> | ||
<script> | ||
let results = document.getElementById('results') | ||
navigator.mediaDevices.enumerateDevices() | ||
.then(function(devices) { | ||
devices.forEach(function(device) { | ||
let li = document.createElement('li') | ||
li.textContent = [device.label, device.deviceId].join(': ') | ||
results.appendChild(li) | ||
}); | ||
}) | ||
</script> | ||
</body> |