fix: prevent stream exit during overlays
This commit is contained in:
@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button";
|
||||
import { updateParticleProperties } from "@/lib/firestore-particles";
|
||||
import { particlePath, toFirestoreDocPath } from "@/lib/particle-path";
|
||||
import type { Particle } from "@/api/types";
|
||||
import { usePlaybackSuspenderStore } from "@/stores/playback-suspender-store";
|
||||
|
||||
interface RenameStreamOverlayProps {
|
||||
networkId: string;
|
||||
@@ -17,6 +18,13 @@ export function RenameStreamOverlay({
|
||||
streamParticle,
|
||||
onClose,
|
||||
}: RenameStreamOverlayProps) {
|
||||
// Suspend stream playback
|
||||
useEffect(() => {
|
||||
const { suspend, release } = usePlaybackSuspenderStore.getState();
|
||||
suspend();
|
||||
return release;
|
||||
}, []);
|
||||
|
||||
const [name, setName] = useState(streamParticle.properties.name);
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user