mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user