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;
|
||||
}) {
|
||||
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 hasPipewirePulse = sources.ok ? sources.hasPipewirePulse : true;
|
||||
|
||||
const [ignorePulseWarning, setIgnorePulseWarning] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -348,32 +352,38 @@ function AudioSourcePickerLinux({
|
|||
<Forms.FormTitle>Audio Source</Forms.FormTitle>
|
||||
)}
|
||||
|
||||
{!sources.ok &&
|
||||
(sources.isGlibcxxToOld ? (
|
||||
<Forms.FormText>
|
||||
Failed to retrieve Audio Sources because your C++ library is too old to run venmic. If you
|
||||
would like to stream with Audio, see{" "}
|
||||
<a
|
||||
href="https://gist.github.com/Vendicated/b655044ffbb16b2716095a448c6d827a"
|
||||
target="_blank"
|
||||
>
|
||||
this guide
|
||||
</a>
|
||||
</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>
|
||||
))}
|
||||
{!sources.ok && sources.isGlibCxxOutdated && (
|
||||
<Forms.FormText>
|
||||
Failed to retrieve Audio Sources because your C++ library is too old to run
|
||||
<a href="https://github.com/Vencord/venmic" target="_blank">
|
||||
venmic
|
||||
</a>
|
||||
. See{" "}
|
||||
<a href="https://gist.github.com/Vendicated/b655044ffbb16b2716095a448c6d827a" target="_blank">
|
||||
this guide
|
||||
</a>{" "}
|
||||
for possible solutions.
|
||||
</Forms.FormText>
|
||||
)}
|
||||
|
||||
{allSources && (
|
||||
<Select
|
||||
options={allSources.map(s => ({ label: s, value: s, default: s === "None" }))}
|
||||
isSelected={s => s === audioSource}
|
||||
select={setAudioSource}
|
||||
serialize={String}
|
||||
/>
|
||||
{hasPipewirePulse || ignorePulseWarning ? (
|
||||
allSources && (
|
||||
<Select
|
||||
options={allSources.map(s => ({ label: s, value: s, default: s === "None" }))}
|
||||
isSelected={s => s === audioSource}
|
||||
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} />
|
||||
|
|
Reference in a new issue