Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IndexedDB to store audio

Is it possible to use IndexedDB on a web page to store audio?

Currently trying out the Cache API, but looking for something that can be a little more persistent.

like image 630
austinh Avatar asked Jun 30 '17 15:06

austinh


People also ask

What can be stored in IndexedDB?

A database may have multiple stores: one for users, another one for goods, etc. Despite being named an “object store”, primitives can be stored too. We can store almost any value, including complex objects. IndexedDB uses the standard serialization algorithm to clone-and-store an object.

Can I store files in IndexedDB?

Not everything can be stored in IndexedDB on all platforms # If you are storing large, user-generated files such as images or videos, then you may try to store them as File or Blob objects. This will work on some platforms but fail on others. Safari on iOS, in particular, cannot store Blob s in IndexedDB.

How much can I store in IndexedDB?

IndexedDB doesn't offer unlimited storage, but it's far less limiting than the other options. It's the only choice for larger client-side datasets.

When should I use IndexedDB?

You might use IndexedDB to store structured data that's unrelated to any data on the server. An example might be a calendar, a to-do list, or saved games that are played locally. In this case, the application is really a local one, and your web site is just the vehicle for delivering it.


1 Answers

Sure you can, as long as your files don't take more than 10% of the available space on the device's storage or 2GB whatever is smaller, you can store any binary file you wish in IndexedDB.

like image 192
Kaiido Avatar answered Nov 09 '22 16:11

Kaiido