From 2c3fe68c3e3f42fe9ceceabd77c6b47f3a4e2125 Mon Sep 17 00:00:00 2001 From: Marcello Fuschi Date: Tue, 4 Jun 2024 01:22:03 -0300 Subject: [PATCH] Fix typo in README (#488) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff30024f..91379b38 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ There's a ton of them, but these are worth mentioning because they sort of affec * `@material-ui` - Lots of fully featured highly customizable components for building the UIs with. Theming system with global and per-component overrides of any CSS values. * `react-router-redux` - the newer one, 5.x.... Mindlessly simple routing with convenient global access due to redux -## How things works +## How things work The current playback is tracked not by storing the current offset, but instead storing the local time that the player began, the offset it began at, and the playback rate. Any time any of these values change, it rebases them all back to the current time. It means that at any arbitrary moment you can calculate the current offset with... ```js (Date.now() - state.startTime) * state.playSpeed + state.offset