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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user