restored accidentally (how???) removed code
This commit is contained in:
parent
f695dbadab
commit
3f4936f1cf
1 changed files with 36 additions and 26 deletions
|
@ -334,9 +334,13 @@ function AudioSourcePickerLinux({
|
||||||
setOnlyDefaultSpeakers(b: boolean): void;
|
setOnlyDefaultSpeakers(b: boolean): void;
|
||||||
}) {
|
}) {
|
||||||
const [sources, _, loading] = useAwaiter(() => VesktopNative.virtmic.list(), {
|
const [sources, _, loading] = useAwaiter(() => VesktopNative.virtmic.list(), {
|
||||||
fallbackValue: { ok: true, targets: [] }
|
fallbackValue: { ok: true, targets: [], hasPipewirePulse: true }
|
||||||
});
|
});
|
||||||
|
|
||||||
const allSources = sources.ok ? ["None", "Entire System", ...sources.targets] : null;
|
const allSources = sources.ok ? ["None", "Entire System", ...sources.targets] : null;
|
||||||
|
const hasPipewirePulse = sources.ok ? sources.hasPipewirePulse : true;
|
||||||
|
|
||||||
|
const [ignorePulseWarning, setIgnorePulseWarning] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -348,32 +352,38 @@ function AudioSourcePickerLinux({
|
||||||
<Forms.FormTitle>Audio Source</Forms.FormTitle>
|
<Forms.FormTitle>Audio Source</Forms.FormTitle>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!sources.ok &&
|
{!sources.ok && sources.isGlibCxxOutdated && (
|
||||||
(sources.isGlibcxxToOld ? (
|
<Forms.FormText>
|
||||||
<Forms.FormText>
|
Failed to retrieve Audio Sources because your C++ library is too old to run
|
||||||
Failed to retrieve Audio Sources because your C++ library is too old to run venmic. If you
|
<a href="https://github.com/Vencord/venmic" target="_blank">
|
||||||
would like to stream with Audio, see{" "}
|
venmic
|
||||||
<a
|
</a>
|
||||||
href="https://gist.github.com/Vendicated/b655044ffbb16b2716095a448c6d827a"
|
. See{" "}
|
||||||
target="_blank"
|
<a href="https://gist.github.com/Vendicated/b655044ffbb16b2716095a448c6d827a" target="_blank">
|
||||||
>
|
this guide
|
||||||
this guide
|
</a>{" "}
|
||||||
</a>
|
for possible solutions.
|
||||||
</Forms.FormText>
|
</Forms.FormText>
|
||||||
) : (
|
)}
|
||||||
<Forms.FormText>
|
|
||||||
Failed to retrieve Audio Sources. If you would like to stream with Audio, make sure you're
|
|
||||||
using Pipewire, not Pulseaudio
|
|
||||||
</Forms.FormText>
|
|
||||||
))}
|
|
||||||
|
|
||||||
{allSources && (
|
{hasPipewirePulse || ignorePulseWarning ? (
|
||||||
<Select
|
allSources && (
|
||||||
options={allSources.map(s => ({ label: s, value: s, default: s === "None" }))}
|
<Select
|
||||||
isSelected={s => s === audioSource}
|
options={allSources.map(s => ({ label: s, value: s, default: s === "None" }))}
|
||||||
select={setAudioSource}
|
isSelected={s => s === audioSource}
|
||||||
serialize={String}
|
select={setAudioSource}
|
||||||
/>
|
serialize={String}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<Text variant="text-sm/normal">
|
||||||
|
Could not find pipewire-pulse. This usually means that you do not run pipewire as your main
|
||||||
|
audio-server. <br />
|
||||||
|
You can still continue, however, please beware that you can only share audio of apps that are
|
||||||
|
running under pipewire.
|
||||||
|
<br />
|
||||||
|
<a onClick={() => setIgnorePulseWarning(true)}>I know what I'm doing</a>
|
||||||
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} />
|
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} />
|
||||||
|
|
Reference in a new issue