I make Pianory, a browser piano learning and practice app. AI helped draft this article; I checked its claims against the current source and focused tests.
Our local recording store has to persist browser audio safely. The code documents a WebKit IndexedDB problem with Blob values in ephemeral sessions, including Safari private browsing and automated WebKit. New audio rows therefore store an ArrayBuffer of bytes, while an optional Blob field remains readable for older rows. This is a documented implementation choice, not a claim that a unit test reproduces the browser bug.
A subtle detail is when conversion happens. Saving awaits blob.arrayBuffer() before opening the read-write transaction. Awaiting asynchronous conversion inside a transaction risks letting IndexedDB auto-commit before the metadata and audio writes finish. Once bytes are ready, the store adds the metadata and audio row in one transaction.
At read time, it accepts the legacy Blob or reconstructs a Blob from bytes and the stored MIME type.…