fix: playback restarting from start of stream

This does a major refactor to using particleId for state of playback
instead of index, since index would change if the particle children data
does partial hydrations and a particle's index changes. Also it
abstracts much of the playback details from the view component.
This commit is contained in:
talksik
2026-03-21 15:11:26 -07:00
parent 79d8d0eac0
commit e96f5cbe8a
3 changed files with 285 additions and 166 deletions
+4
View File
@@ -143,6 +143,10 @@ export function subscribeToParticleChildren(
return onSnapshot(
q,
(snap) => {
// onNext(snap.docChanges().map((change) => {
// const data = change.doc.data();
// return { type: change.type, data };
// }));
onData(snap.docs.map((d) => d.data()));
},
onError,