mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
Replaygain support for Web Player (#243)
* replaygain! * resume context * don't fire both players * replaygain for jellyfin * actually remove console.log --------- Co-authored-by: Jeff <42182408+jeffvli@users.noreply.github.com> Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { lazy, Suspense, useMemo } from 'react';
|
||||
import { Divider, Stack } from '@mantine/core';
|
||||
import { AudioSettings } from '/@/renderer/features/settings/components/playback/audio-settings';
|
||||
import { ScrobbleSettings } from '/@/renderer/features/settings/components/playback/scrobble-settings';
|
||||
@@ -12,13 +12,20 @@ const MpvSettings = lazy(() =>
|
||||
);
|
||||
|
||||
export const PlaybackTab = () => {
|
||||
const hasFancyAudio = useMemo(() => {
|
||||
return isElectron() || 'AudioContext' in window;
|
||||
}, []);
|
||||
return (
|
||||
<Stack spacing="md">
|
||||
<AudioSettings />
|
||||
<Suspense fallback={<></>}>{isElectron() && <MpvSettings />}</Suspense>
|
||||
<Divider />
|
||||
<ScrobbleSettings />
|
||||
<Suspense fallback={<></>}>{hasFancyAudio && <MpvSettings />}</Suspense>
|
||||
<Divider />
|
||||
{isElectron() && (
|
||||
<>
|
||||
<ScrobbleSettings />
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
<LyricSettings />
|
||||
</Stack>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user