This commit is contained in:
2025-08-14 11:40:02 -04:00
parent ccea5db9e9
commit dbb70fc743
7 changed files with 112 additions and 38 deletions

View File

@@ -11,7 +11,6 @@ const STATIONS = {
rock: { label: "Rock" },
rap: { label: "Rap" },
electronic: { label: "Electronic" },
classical: { label: "Classical" },
pop: { label: "Pop" },
};
@@ -84,8 +83,8 @@ export default function Player() {
const hls = new Hls({
lowLatencyMode: true,
abrEnabled: false,
liveSyncDuration: 2.5, // seconds behind live edge target
liveMaxLatencyDuration: 3.5, // max allowed latency before catchup
liveSyncDuration: 1.0, // seconds behind live edge target
liveMaxLatencyDuration: 2.0, // max allowed latency before catchup
liveCatchUpPlaybackRate: 1.05, // playback speed when catching up
});
@@ -111,8 +110,6 @@ export default function Player() {
// Update elapsed time smoothly
useEffect(() => {
if (!isPlaying) return;
const intervalId = setInterval(() => {
const now = Date.now();
const deltaSec = (now - lastUpdateTimestamp.current) / 1000;