mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00: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:
parent
fd264daffc
commit
65f28bb9dc
10 changed files with 190 additions and 17 deletions
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue