refactor: restructure state, routing, and more
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { create } from "zustand";
|
||||
import type { StreamParticle } from "@/api/types";
|
||||
import type { Particle } from "@/api/types";
|
||||
|
||||
type PlaybackStatus = "idle" | "playing" | "ended";
|
||||
|
||||
interface PlaybackState {
|
||||
streamId: string | null;
|
||||
particles: StreamParticle[];
|
||||
particles: Particle[];
|
||||
currentIndex: number;
|
||||
status: PlaybackStatus;
|
||||
paused: boolean;
|
||||
@@ -13,7 +13,7 @@ interface PlaybackState {
|
||||
|
||||
initStream: (
|
||||
streamId: string,
|
||||
particles: StreamParticle[],
|
||||
particles: Particle[],
|
||||
startIndex: number,
|
||||
) => void;
|
||||
next: () => void;
|
||||
|
||||
Reference in New Issue
Block a user