π₯ Make videos programmatically with React
document persistance and restructure docs
JonnyBurger5eb060dda949
diff --git a/packages/docs/docs/editor-starter/index.mdx b/packages/docs/docs/editor-starter/index.mdxindex e420a2b6bc..50efcef047 100644--- a/packages/docs/docs/editor-starter/index.mdx+++ b/packages/docs/docs/editor-starter/index.mdx@@ -13,7 +13,7 @@ A template containing the most essential elements of a video editor.- **Save dozens of hours** by leveraging our pre-made controls for canvas items, timeline, font picker, asset uploader, etc.- **Get the best of Remotion** put together into one application, culminating years of development and battle-testing.-- **Customize to your liking** by adopting a clean, well-structured codebase with 50+ feature flags.+- **Customize to your liking** by adopting a clean, well-structured codebase with 60+ feature flags.import {TableOfContents} from './TableOfContents';diff --git a/packages/docs/docs/editor-starter/persistance.mdx b/packages/docs/docs/editor-starter/persistance.mdxindex a1633a4990..dda04ff76b 100644--- a/packages/docs/docs/editor-starter/persistance.mdx+++ b/packages/docs/docs/editor-starter/persistance.mdx@@ -9,7 +9,7 @@ crumb: Editor StarterThere are 2 types of persistance in the Editor Starter:- Saving the editor state-- Caching the [assets](/docs/editor-starter/tracks-items-assets) (videos, images, audio, etc.)+- Caching the [assets](/docs/editor-starter/tracks-items-assets) (videos, images, audio, etc.) in IndexedDB## Saving the editor state@@ -57,4 +57,18 @@ If you change the structure of your state, consider incrementing the version of## Caching assets-TODO+Because loading the assets remotely can be slow, the Editor Starter caches them in IndexedDB and prefers them over remote assets when displaying.++The [`indexeddb.ts`](https://github.com/remotion-dev/editor-starter/blob/main/src/editor/caching/indexeddb.ts) file contains the implementation of the IndexedDB.++Assets need to be manually cleaned up when they are no longer needed: [Asset cleanup](/docs/editor-starter/asset-cleanup)++The [`<DownloadRemoteAssets>`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20DownloadRemoteAssets&type=code) component downloads any assets that are remote and caches them locally.++The [`<UseLocalCachedAssets>`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20UseLocalCachedAssets&type=code) component loads cached assets from IndexedDB and turns them into blob URLs.+In addition, the [`initialize()`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+const+initialize&type=code) function will load any cached assets from IndexedDB before the initial editor state loaded, to prevent any requests to the remote server if possible.++## See also++- [Asset uploads](/docs/editor-starter/asset-uploads)+- [Asset cleanup](/docs/editor-starter/asset-cleanup)diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex ccb0c4bd8a..675d9bf03d 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1340,10 +1340,28 @@ const sidebars: SidebarsConfig = {'timeline/render',],},+{- type: 'category',+ type: 'link',+ href: '/docs/editor-starter',label: 'Editor Starter',className: 'wip-item',+ },+ {+ type: 'link',+ href: '/docs/recorder',+ label: 'Recorder',+ },+ ],+ editorStarterSidebar: [+ {+ type: 'link',+ href: '/docs',+ label: 'β Back to the main docs',+ },+ {+ type: 'category',+ label: 'Editor Starter',link: {type: 'doc',id: 'editor-starter/index',@@ -1368,11 +1386,6 @@ const sidebars: SidebarsConfig = {'editor-starter/faq',],},- {- type: 'link',- href: '/docs/recorder',- label: 'Recorder',- },],recorderSidebar: [{