Remove stream url, cleanup old audio player (#1269)

* Remove stream url, cleanup old audio player

* remove unused api in playerbar waveform

* make jellyfin transcoding work?
This commit is contained in:
Kendall Garner
2025-11-23 17:12:33 -08:00
committed by jeffvli
parent db110733a4
commit 80419a1edf
13 changed files with 160 additions and 621 deletions
@@ -6,7 +6,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
import { CustomPlayerbarSlider } from './playerbar-slider';
import styles from './playerbar-waveform.module.css';
import { api } from '/@/renderer/api';
import { useSongUrl } from '/@/renderer/features/player/audio-player/hooks/use-stream-url';
import { usePlayer } from '/@/renderer/features/player/context/player-context';
import {
BarAlign,
@@ -37,26 +37,7 @@ export const PlayerbarWaveform = () => {
const songDuration = currentSong?.duration ? currentSong.duration / 1000 : 0;
// Get the stream URL with transcoding support
const streamUrl = useMemo(() => {
if (!currentSong?._serverId || !currentSong?.streamUrl) {
return null;
}
if (!transcode.enabled) {
return currentSong.streamUrl;
}
return api.controller.getTranscodingUrl({
apiClientProps: {
serverId: currentSong._serverId,
},
query: {
base: currentSong.streamUrl,
...transcode,
},
});
}, [currentSong, transcode]);
const streamUrl = useSongUrl(currentSong, true, transcode);
const primaryColor = usePrimaryColor();