-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix regression breaking venmic (#531)
- Loading branch information
Showing
3 changed files
with
29 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0 | ||
* Vesktop, a desktop app aiming to give you a snappier Discord Experience | ||
* Copyright (c) 2023 Vendicated and Vencord contributors | ||
*/ | ||
|
||
import { addPatch } from "./shared"; | ||
|
||
addPatch({ | ||
patches: [ | ||
{ | ||
find: 'setSinkId"in', | ||
replacement: { | ||
// eslint-disable-next-line no-useless-escape | ||
match: /return (\i)\?navigator\.mediaDevices\.enumerateDevices/, | ||
replace: "return $1 ? $self.filteredDevices" | ||
} | ||
} | ||
], | ||
|
||
async filteredDevices() { | ||
const original = await navigator.mediaDevices.enumerateDevices(); | ||
return original.filter(x => x.label !== "vencord-screen-share"); | ||
} | ||
}); |
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